- Log in to your cPanel account.
- In the Files section, click File Manager.
- Select the appropriate domain or folder location, then click Go.
- Navigate to the directory containing the
.htaccessfile. For the main website document root, this is usuallypublic_html. - If the file is not visible, click Settings in the upper-right corner of File Manager. Select Show Hidden Files (dotfiles), then click Save.
- Right-click the
.htaccessfile and select Edit or Code Edit from the context menu. - If a Code Editor confirmation window appears, click Edit to open the editor.
- Make your changes, then click Save Changes.
If no .htaccess file exists in the directory, create one using File Manager before editing it.
