3 Simple .htaccess Tweaks to Safeguard Your Website

WordPress security tipsIf you are using wordpress powered blogs then you might be advised to install many security plugins and keep the password secure and safe to get rid from hackers. But one thing which most of the bloggers forget to do is tweaking their .htaccess files and preventing your very sensitive files from the hands of hackers.

1. Safe guard your wp-config.php

Wp-config, this is very sensitive files in your wordpress blog because it contains all information about your MSql database so if hackers get access to wp-config files then they can easily get hack your database.

# protect wpconfig.php
<files wp-config.php>
order allow,deny
deny from all
</files>

2. Prevent certain IP Address

Few days’ back I got multiple password recovery mail from wordpress because some had tried to reset my admin password for repeated number of times. I don’t know who is trying to access my website but their IP address is tracked in recovery mail.
So after seeing this I blocked their IP address by using my .htaccess file and then I didn’t get any issues like this after.

<Limit GET POST>
order allow,deny
deny from 192.168.222.44
allow from all
</Limit>

3. Disallow WP-Content from indexing

Your blog should access from only URL of the post shared by you. Your Wp-content folder contains all your images, files and theme files that are very sensitive and should be protected from other hands. So blocking those pages from search engine is more important, try this code in your .htaccess file to block wp-content folder from search engine.

Order deny,allow
Deny from all
<Files ~ “.(xml|css|jpe?g|png|gif|js)$”>
Allow from all
</Files>

Author Bio –
Roy Stephen is a writer, blogger and social media enthusiasts who had worked previously for various firms to leverage their rankings. He currently writes for the site Hostgator coupon code, a site where you can get coupon code and also Hostgator tutorials to guide you in hosting.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge