In this article we explain how to find and edit your .htaccess file using cPanel File Manager or via FTP using FileZilla. Your .htaccess is an important file which is used to control how your website works on your DomainsFoundry web hosting.

Steps to edit .htaccess using cPanel File Manager

  1. Log in to cPanel
  2. Click File Manager
  3. Click Settings at the top right.
  4. Tick Show Hidden Files (dotfiles)
  5. Click Save
  6. Select public_html to list your website files
  7. Select .htaccess and click Edit
  8. Click Edit
  9. Enter your new code and click Save Changes at the top right when you have finished.
  10. Click Close to close the file

Steps to edit .htaccess using FTP (FileZilla)

  1. Open FileZilla and log in to your web space using FTP
  2. Double-click public_html to list your website files
  3. Select .htaccess, right-click and select View/Edit
  4. Enter your new code. Save the file once you have finished editing
  5. Click Yes in FileZilla to upload your new .htaccess file

Frequently Asked Questions

My .htaccess file is missing even after I have enabled ‘Show Hidden Files’, what do I do?

It’s possible your .htaccess file has been deleted. To fix, create a new .htaccess file using the steps below:

Steps to create a .htaccess file using cPanel File Manager

  1. Log in to cPanel
  2. Click File Manager
  3. Select public_html to list your website files
  4. Click + File from the tool bar.
  5. Enter .htaccess for the New File Name
  6. Ensure /public_html is entered for New file will be created in:
  7. Click Create New File

Steps to create a .htaccess file using FTP (FileZilla)

  1. Open FileZilla and log in to your web space using FTP
  2. Double-click public_html to list your website files
  3. In the file listing, right-click and select Create New File
  4. Enter .htaccess for the File Name
  5. Click OK