Where is my .htaccess File? Print

  • .htaccess location, .htaccess file, dotfiles, Hidden Files
  • 0

In this article we will show you where your account's .htaccess file resides on the server, as well as how to edit it.

What is .htaccess?

The .htaccess file is a hidden text file that allows you to control the way visitors access your site. Some common uses of the .htaccess file would be restricting access to certain files or redirecting URLs.

You can review our full .htaccess file reference list for more examples of what you can do with a .htaccess file.

Where is my .htaccess file?

You can use your favorite FTP client to modify this file or follow the steps below to access it directly from cPanel:

Step 1.  Login to your cPanel.
Step 2.  Under the Files section, click on File Manager.
Step 3.  Locate your .htaccess file, you may have to show hidden files (click Settings-->Check the "Show Hidden Files (dotfiles)" box).
Step 4.  Right-click on the .htaccess file and select Edit.
Step 5.  If you didn't locate your .htaccess file during the previous step, click on +File on the top-left, name the file .htaccess, and finally set the directory for the file to be created to /public_html/ or the document root of your site.
Step 6.  You might have a text editor encoding dialog box pop-up, you can simply click on Edit.

Congratulations, now you know how to locate, and edit your .htaccess file!


Was this answer helpful?

« Back