How to Edit .htaccess File in the cPanel File Manager
- Log in to your cPanel account.
- In the Files section, click on File Manager.
- Navigate to the directory where your dot htaccess file is located. To edit the .htaccess file of your root directory, navigate to the public_html directory.
- If the dot 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 dot htaccess file should be present. If it does not exist, create a new one.
- Right-click on the dot htaccess file and then Edit in the Context Menu.
- In a new window box, click on Edit.
- Make changes to your dot htaccess file and click on Save Changes.