Skip to main content

Edit htaccess through cPanel File Manager

How Can We Help?

You are here:
← All Topics

Edit htaccess through cPanel File Manager

An .htaccess file is a plain text file used to configure directories within an Apache server environment.  This file is used to control the behavior of a directory or, depending upon it’s location, an entire website.  The htaccess file may be used to control redirects, password protect a directory, deny indexing, or any number of directory specific functions.  For more information regarding htaccess file visit the Apache htaccess tutorial. To edit your htaccess file through cPanel file manager, log into your cPanel account either through your Client Portal or directly through cPanel (https://yourdomain.com:2083/). In the cPanel search bar, type “file” and then click File Manager.

cPanel file manager

Step 1

In order edit your htaccess file first make sure it is visible to you.  If you do not see the htaccess file within your public_html directory select Settings in the upper right hand corner of the file manager screen.

cPanel file manager htaccess location

Once you’ve opened the file manager preferences dialog box, select the Show Hidden Files (dotfiles) checkbox and save.  Hidden, or dotfiles, like .htaccess will now be visible to you within the file manager.

cPanel file manager preferences dialog

Step 2

You may now upload or download an htaccess file. The htaccess file may be edited in any text editor, MS Notepad for example.

Click Upload

Download Files with cPanel File Manager

CAUTION

Please note that the existing htaccess file will contain default code that in most cases should not be edited.

Helpful Tip: All files, including dotfiles, may be accessed directly through FTP.  For instructions on how to set up and connect an FTP account with cPanel see our Add an FTP Account in cPanel article. Add an FTP Account in cPanel