How to Edit (Dot)htaccess File in the cPanel File Manager?

1. Log in to your cPanel account.

2. In the Files section, click on File Manager.
 File Manager icon
3. Navigate to the directory where your .htaccess file is located. To edit the .htaccess file of your root directory, navigate to the public_html directory.
4. If the .htaccess file does not show, click on Settings in the File Manager. You can find the Settings button on the right side of the top menu. Mark the Show Hidden Files (Dotfiles) option in the new window box and click on Save. Now, the .htaccess file should be present. If it does not exist, create a new one.
.htaccess file creation

5. Right-click on the .htaccess file and then Edit in the Context Menu.
Context menu

6. In a new window box, click on Edit.
Editing .htaccess file

7. Make changes to your dot htaccess file and click on Save Changes.
.htaccess modified file

Was this answer helpful?

Related Articles

How to Change the PHP Version for Each Domain in cPanel

Do you have multiple domains and wish to configure the PHP version for each one? PHP 8.1 can be...

How to Change the PHP Version in Each Directory in cPanel

Do you want distinct PHP versions in each directory? This is possible using cPanel and the...

How to Monitor the Disk and Bandwidth Usage of Directories

If you receive a disk space utilization warning from cPanel and don't know which directory is...

How to Reset the PHP Version to the Default Version in cPanel

If you want to reset the PHP version to its default state, perform these steps: 1. Log in to...

How to Update the cPanel's Contact Information or Receive Notification of Resource Limit Exceedance

If you want to receive a notification on reaching your disk quota, bandwidth usage limit or wish...