In this article I'm going to quickly show you where your account's .htaccess file resides on the server, and how to edit it.

What 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 is 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. Select the Document Root for: option, and choose your domain from the drop-down.
  4. Ensure that Show Hidden Files is selected.
  5. Then click Go.
  6. file-manager-hidden-files
     
  7. Right-click on the .htaccess file and select Edit.
  8. file-manager-htaccess-edit
     
  9. If your .htaccess file didn't exist already during the previous step, click on New 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.
  10. file-manager-htaccess-create
     
  11. You might have a text editor encoding dialog box pop-up, you can simply click on Edit.
  12.  

 

You should now know where to locate your .htaccess file on your account, and how you can make edits to it.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 200883

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!