I can’t find my .htaccess file?
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:
You can use your favorite FTP client to modify this file, or follow the steps below to access it directly from cPanel:
- Login to your cPanel.
- Under the Files section, click on File Manager.
- Locate your .htaccess file, you may have to show hidden files (click Settings–>Check the “Show Hidden Files (dotfiles)” box).
- Right-click on the .htaccess file and select Edit.
- 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.
- 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.