Top Five Coupon Codes For Free First Month

hostgator first month free
  1. freetryamonth
  2. freetrials101
  3. trynowhost
  4. freehostingplan
  5. freehostingdeals

Top Five Coupon Codes For Hostgator 25% Off

hostgator 25 off coupon
  1. instantsaves
  2. supersaves
  3. instant25percent
  4. everydaysaves
  5. everydaystuff

HostGator .htaccess File

.htaccess is a configuration and Apache file that manages website and orders website how to function. Most webhosting server companies allow users to have the abilities to modify the file. There are few common usage of the .htaccess. You can set up the htaccess file as kind of authorization, and most often it is accompanied with .htpasswd. You can also write your website urls by utilizing the .htaccess; you can do redirection or 301 redirection. On top of that, you can also use .htaccess to block certain IP address from accessing to your site; likewise, you can also use .htaccess to only allow certain IP address to access your site, and block all other users.

Hostgator is one of many companies that allows users to edit  .htaccess file. In default, Hostgator already had .htaccess protected, and it will always be in the root directory.  Even if you accidently delete the .htaccess file, it will regenerate itself and reappear in the root directory.

Even though Hostgator has pretty secured servers, it is still best to know how to harden your website by utilizing .htaccess, especially when it comes to wordpress. Now, more and more people are moving their sites to wordpress because it is very easy to manage content and stuffs. As a result, wordpress has become targets for many hackers. Therefore, it is better to know how to protect it. One file that one needs to secure is wp-includes folder. To do that, you can simply copy the following codes and paste the codes into the .htaccess file; to open .htaccess file, you can simply right click on the file and set it open as text file:

# Block the include-only files.

RewriteEngine On

RewriteBase /

RewriteRule ^wp-admin/includes/ – [F,L]

RewriteRule !^wp-includes/ – [S=3]

RewriteRule ^wp-includes/[^/]+\.php$ – [F,L]

RewriteRule ^wp-includes/js/tinymce/langs/.+\.php – [F,L]

RewriteRule ^wp-includes/theme-compat/ – [F,L]

After you have done, you can simply save it.  You can also secure wp-config.php file by utilizing .htaccess file. To do that, you can copy following codes and paste into the .htaccess file:

<files wp-config.php>

order allow,deny

deny from all


In addition, you should know that Hostgator has default codes in the .htaccess file; even if you delete the file, it will still be there:

DirectoryIndex index.html index.shtml index.php default.html home.html

However, you can change the directory index by overwrite it and make your own rule. For example

DirectoryIndex front.html frontpage.html home2.html

which will overwrite the default ones, and open front.html, frontpage.html, home2.html, instead of opening index.html, index.shml, etc.

Disclosure – FTC requirement.

Any link on when you click it and it redirects you to HostGator homepage is affiliate link. If you signup using the affiliate link I will get commission.