I can’t find my .htaccess file?

Posted byKeenweb inGuide on November 9, 2016 with0 Comment

This is a quick article with steps to show you where your account’s .htaccess file resides on the server, and how to edit it.

What exactly is .htaccess?

The .htaccess file is a hidden text file that allows you to control the way visitors are able to 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 can i find my .htaccess file?

By default you should have a .htaccess file created on your account in the following directory:

/home/userna5/public_html/.htaccess

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

  1. Login to your cPanel.
  2. Under the Files section, click on File Manager.
  3. Locate your .htaccess file, you may have to show hidden files (click Settings–>Check the “Show Hidden Files (dotfiles)” box).
  4. Right-click on the .htaccess file and select Edit.
  5. If your .htaccess file didn’t exist already during the previous step, click on +File at 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.
  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!

Comments are closed.