Showing results for 
Show  only  | Search instead for 
Did you mean: 

Who created .htaccess, what is it, and should I delete it?

I noticed a ".htaccess" file in my File Manager.  All it has inside are the words "RewriteEngine On."  I didn't create it.  Did GoDaddy do so?  Why? The forum answers I've seen on other .htaccess questions here (nor in web search engines) aren't helpful, and the Apache explanation is confusing.

Community Team
Community Team

That's a default server file.  It allows you to manage certain aspects of the hosting plan.  It's not typically something you'll need to worry about unless you want to make some advanced changes to the way your site is configured.  




.htaccess is very powerful and its worth doing some homework.  As stated above, it does in fact control the server interface to your site, among other things.


I use .htaccess for 301 redirections and storing the URLs for new pages that replace old.  Redirection from old deleted pages to new pages is essential.  It  helps to avoid 404 page not found errors.  That is good practice for your customers and also helps to improve SEO results.


I also use .htaccess to screen and filter which IP addresses have access to my site. Blacklisting is standard protocol for spammers or other bad actors that site experience or security has identified.  For example, some bots like to pretend they are Google bots.  Google bots collect site map and other data.  Fake Google bots are looking for site vulnerabilities (e.g. web platform version number, plug-in version numbers, etc).  Blacklisting bad bot IPs prevents site server access.  In this case, the file is serving a valuable security role.


These are just 2 potential uses of the file.  There's more!