Editing the .HTACCESS File

The .htaccess file is for instructing the server (where your website is hosted) to do certain things in certain situations.

It’s important to always have a local backup of your website handy before performing such actions as editing .dotfiles and any major change.

To edit the .HTACCESS file, follow the directions below.

  1. Log into cPanel.
  2. In the Files section, click on the File Manager icon.
  3. Check the box for Document Root for and select the domain name you wish to access from the drop-down menu.
  4. Make sure Show Hidden Files (dotfiles)” is checked.
  5. Click Go. The File Manager will open in a new tab or window.
  6. Look for the .htaccess file in the list of files. You may need to scroll to find it.
  7. 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.
  8. A dialogue box may appear asking you about encoding. Just click Edit to continue. The editor will open in a new window.
  9. Edit the file as needed.
  10. Click Save Changes in the upper right-hand corner when done. The changes will be saved.
  11. Test your website to make sure your changes were successfully saved. If not, correct the error or revert back to the previous version until your site works again.
  12. Click Close to close the File Manager window.