InMotion Hosting Support Center

In this tutorial:

Htaccess files are hidden plain text files that are on the server to help control how your visitors interact with your website. The htaccess file is also used to block specific traffic from being able to view your website. If you look for your .htaccess file you'll see that there's no filename. The extension is .htaccess which tells the server what type of file it is. In cPanel you can see if you have a current .htaccess file using file manager but you will need to make sure you have selected to view hidden files. If you are not familiar with using file manager please read our article.  To view hidden files in file manager, select the 'file manager' icon in cPanel and make sure the box is checked next to 'Show Hidden Files.' Then click 'OK' and you will be able to view hidden files. 

What can you do with a .htaccess file?

You might have a private area of your website you wish to keep password protected. This password protection is actually set up in the .htaccess file. Most of the functions of the htaccess file, you do not have to concern yourself with as they will be automatically written through cPanel. This is the case of password protecting directories. While you set it up in cPanel, it actually writes a directive to your htaccess file. 

Other functions of the htaccess file include, prohibiting hotlinks, rewriting URLs, setting default pages, creating redirects, reconfiguring account settings, and much more. It's really important to realize how the htaccess file can affect your entire account. Changing something in the htaccess file can alter how your website functions so it's really important BEFORE making changes to your htaccess to backup your current htaccess file.

Troubleshooting Errors caused by the .htaccess File

If you are getting errors on your website, the .htaccess file can often be the culprit.

  • This is easily tested by renaming your current htaccess file. Often, during troubleshooting I'll simply rename the .htaccess to .htaccess.old and now I'll reload the website. If the site loads I then know the issue resides in my configuration of the .htaccess file. If it does not fix the issue I was having, I'll rename the htaccess by removing the .old I added to the end. That way, it won't affect my website after I resolve the issue.
  • If you are not seeing a change in your PHP settings, you may have to make your php.ini file affect all child folders as well. This is referred to as making the file "recursive". In this case, see our full guide: How can I make my php.ini file recursive.

Support Center Login

Social Media Login

Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Stop Subdomain From Redirecting
Redirect after primary domain change
I am not able to load my site
.htacess working on 1 server but not on another
Host a 3rd party website from my account
I want to show customized url on address bar
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-08-11 11:32 am

I am having question on .htaccess file.  i accidentally override with another file content then my website come with errror, then i found the file and removed all the content inside .htaccess file then it started working fine but my question is when i deleted the content if i also deleted important document, pls tell me if there is some content deleted.

thank you

29,747 Points
2014-08-11 11:45 am
Hello biruhtesfa,

Thank you for your question. There is no way to tell if the content you deleted in the .htaccess file is important.

This is because websites can be coded many ways.

I recommend testing all aspects of your website (shopping carts, forms, scripts, etc.) to make sure it is still functioning after editing your .htaccess file.

If you have any further questions, feel free to post them below.
Thank you,

n/a Points
2014-11-15 8:49 am

if i delete .htaccess by mistake what must i do

29,747 Points
2014-11-17 9:13 am
Hello yusuf,

Thank you for your question. If you deleted your .htaccess file, you can just create a new file and name it: .htaccess

Then add your rules back as needed.

If you have any further questions, feel free to post them below.

Thank you,
n/a Points
2015-01-02 1:58 am

I am unable to find .htaccess file in c9ppanel

10,077 Points
2015-01-02 10:09 am
Hello remya,

The .htaccess file is hidden by default (hence the . at the beginning of the file name) which can be viewed by following the steps in this guide. Also you may not have a .htaccess file as it is not a default file pre-loaded to your account.

Kindest Regards,
TJ Edens
n/a Points
2016-10-07 7:10 am

I've followed all the steps, and I'm not computer illiterate. But, I do NOT have the option to "check the box" to show hidden files. I accidentally switched to the "paper" theme on my cPanel, and now everything looks different.

29,747 Points
2016-10-07 2:39 pm
Here is a link to our guide on How to show hidden files (htaccess) when using cPanel's File Manager. The article has been updated for paper_lantern.

Thank you,
n/a Points
2016-10-12 12:37 pm

Thank you!

n/a Points
2015-02-02 8:17 pm

how does the .htaccess file and CPanel interact.

it appears .htaccess updates CPanel?

I do need an .htaccess for redirection of some files ; need to clarify "what goes where?"

can you advise?


11,186 Points
2015-02-03 9:41 am
Simply put, the .htaccess file defines extra options for the Apache web server. For more information on redirects, you could check our article on 301 redirects with .htaccess.
n/a Points
2015-11-16 4:24 pm

I ever since the .htaaccess was changed, all the installed pluggins, mystile, wordpress are dissappeared. Is there a way to get them back without any re-installation?

Please advise?

43,761 Points
2015-11-16 4:42 pm
Hello Teresa,

Did you rename the .htaccess file? If so, rename it back as it should contain the information to make those things work.

Kindest Regards,
Scott M
n/a Points
2016-04-25 5:32 am


I can able to redirect URL using .htaccess file but i cant mask server IP address with domain name.  is pointed to  (ip address) now i need to redrect /xyz/home.html to, i was able to redirect but i get redirected URL but i need to mask that ip address to





43,761 Points
2016-04-25 1:56 pm
For security purposes, we do not allow masking. The closest you can get is to add a parked domain. Specifically creating a parked domain for the primary domain will have sort of a masking effect.
n/a Points
2016-08-01 6:55 pm

Hi  -

I created and uploaded a .htaccess file using the recommendations of a SEO site. My first attempt.. Must have done something wrong, as my site crashed. I deleted the file, the site came back, but my nav bars, which are in #include files are gone.

Hosting company won't correct programming errors, and I'm at a loss where to look. Files look fine in Dreamweaver, but viewed locally and on the server, not so much.

Appreciate any help.Thanks,Nick

29,747 Points
2016-08-02 11:00 am
It would be very unusual for an .htaccess file to affect the appearance of nav bars. We are happy to help you troubleshoot further, but will need some additional information. Can you provide a link to the site for testing?

Thank you,
n/a Points
2016-08-02 1:56 am

hello, i need your help... i have a web software on, and i need all access inside the domain remais invisible on the navigation bar... no matter where i am on the site, its show only the domain name... is that possible with .htaccess?

29,747 Points
2016-08-02 11:42 am
We have a guide on how to redirect a domain without changing the URL that may provide a possible solution.

But, keep in mind this will require you to test and troubleshoot further.

Be sure to read the stipulations on the bottom of the guide.

Thank you,
n/a Points
2017-06-09 3:41 am

The following errors were found :

  • Could not open the Configuration File .htaccess


How can I solve the error above observing during installation of BoldGrid for my domain.



2,858 Points
2017-06-09 12:12 pm
Thuzar, I would recommend that you make sure that your .htaccess file actually exists, and that your permissions are set properly on it.
n/a Points
2017-09-04 12:30 pm


I have a website in php.Now it has redesigned and launched, and number of pages reduced.Its redesigned in php itself.There is some changes in the url(name of webpages).Is there any need to redirect the url(from old webpage name to new one) in .htaccess file since it is already a php website?

9,466 Points
2017-09-05 11:46 am
One of the common reasons to redirect old pages would be in case any search engine had cached the old page names and those would now result in a 404 if clicked on.

Post a Comment

Email Address:
Phone Number:

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

23 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


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:
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!