Before we do any changes, it is recommended that you backup your websiteso that you can restore back to a previous version if anything goes wrong.

  1. Log into cPanel.
  2. In the Files section, click on the ‘File Manager‘ icon.
  3. Select the ‘Document Root’ radio button and select the domain name you wish to access from the drop-down menu. Make sure ‘Show Hidden Files (dotfiles)’ is checked.
  4. Click ‘Go‘, The File Manager will open in a new tab or window.
  5. Look for the ‘.htaccess’ file in the list of files under ‘public_html’ folder. You may need to scroll to find it.
  6. To Edit the ‘.htaccess’ File, right click on the ‘.htaccess’ file and click ‘Code Edit’from the menu. Alternatively, you can click on the icon for the .htaccess file and then click on the ‘Code Editor’ icon at the top of the page.
  7. A dialogue box may appear asking you about encoding, just click ‘Edit’ to continue and the editor will open in a new window.
  8. Edit the file as needed.
  9. Click ‘Save Changes’ in the upper right hand corner when done, the changes will be saved.
  10. Test your website to make sure your changes were successfully saved. If not, correct the error or revert back to the previous version from the backup until your site works again.
  11. Once complete, you can click ‘Close’ to close the File Manager window.