How to Find Your Site’s .htaccess File in cPanel

How to Find Your Site's .htaccess File in cPanel

“Where is my .htaccess file?”

This is a problem that we’ve helped resolve over and over again at OSTraining.

The .htaccess file is absolutely crucial for the correct operation of many sites, whether they’re running WordPress, Drupal, Joomla or similar platforms. The .htaccess file controls the URLs for sites and also adds many important security features.

Today, one more user was having trouble finding their .htaccess file, so we created this tutorial for her.

Step #1. Access cPanel’s File Manager

  • Go to yourdomain.com/cpanel and log in.

If you’re not sure of the login information, look for the first emails from your hosting company. They’ll provide the cPanel information within there.

  • In the Files section, look for the “File Manager” icon. Click on it.
  • Select “Web Root”
  • Select “Show Hidden Files (dotfiles)”

Troubleshooting tip:

If you don’t receive this popup asking you to “Show Hidden Files (dotfiles)”, it’s because you’ve selected “Skip this question” previously.

If you don’t see the .htaccess file (or any dotfiles) in File Manager, scroll to the bottom of cPanel. Then click on “Reset All Interface Settings”. Afterward, clicking on “File Manager” should get you the popup.

Step #2. Find the .htaccess File

Once in File Manager, you should be able to find the .htaccess file on that page. If not, navigate to your site’s root. So if your site is in a subfolder, go to that subfolder and you should see the .htaccess in there.

Also, note that some sites won’t have a .htaccess and it will need to be created. For example, when Joomla sites are first installed, they come with a sample htaccess.txt. That then needs to be renamed to .htaccess.

Don’t have cPanel?

If you don’t have cPanel in your hosting, please give your host’s file manager a try or use FTP. Our Absolute Beginner’s Guide to FileZilla will help you get started with FTP.

If you’re on localhost, there’s usually not a need to use your .htaccess file. I’d recommend waiting to use it until you move to your production server instead.

Author

  • Nick Savov

    Nick is the Director of Support at OSTraining and you can find him in almost every area of the site, from answering support requests and account questions to creating tutorials and software.

    View all posts
0 0 votes
Article Rating
Subscribe
Notify of
guest

7 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
eren
eren
4 years ago

thanks a lot

Amit Kanojia
Amit Kanojia
4 years ago

Thanks a lot Nick…appreciated!

ANEES IQBAL
ANEES IQBAL
4 years ago

ty

Eeshita
Eeshita
4 years ago

thanks Nick . It worked quickly.

Mikall Hill
3 years ago
Reply to  Eeshita

So glad OST was able to help!

Naziru Adam
Naziru Adam
3 years ago

Thanks 🙂

jhunM
jhunM
3 years ago

sir when I Update joomla I cant open our site anymore receiving the error. You don’t have permission to access this resource.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

7
0
Would love your thoughts, please comment.x
()
x