Block IP address to protect your wp-admin folder using .htaccess

Today I am going to tell you about a small code that will help you to prohibit any computer from opening your “wp-admin” folder or “www.yourdomain.com/wp-admin” area (administrator area) instantly. Generally, WordPress is much better than Google Blogger and that’s why WordPress blog is very eye catching for blog hackers.

Before a few days, I have told you about two different plugins that may be helpful for you. But those two plugins are working in a different process when this trick will help you to add an extra security layer to your blog.

You just have to add a small code to your .htaccess file.

[Note:- .htaccess is working on apache web servers.]

Let me define the code(s).

If you want to block a particular IP address, just add the following code to that file.
order allow,deny
deny form AA.BB.CC.DD
allow from all
Replace the AA.BB.CC.DD with that IP address that you want to block.

Do Check:

If you want to block more than one IP addresses, add this following code to that file.
order allow,deny
deny form AA.BB.CC.DD
deny form AA.BB.CC.DD
deny form AA.BB.CC.DD
deny form AA.BB.CC.DD
allow from all
Replace all AA.BB.CC.DD with those IP addresses that you want to block.

If you want to block a network, add this following code to that file.
order allow,deny
deny from AA.BB.CC
allow from all
Replace the AA.BB.CC with that IP address that you want to block.

But suppose you want to block all IP addresses except yours’, you have to add this following code to your .htaccess file.
order allow,deny
deny from all
allow from AA.BB.CC.DD
Replace the AA.BB.CC.DD with that IP address with your own IP address.

After doing all these, whenever anyone wants to open your wp-admin folder, he/she will be greeted with an error message.

Here is a small video by Matt Cutts who is now going to tell you more about that.


Feel Free to share your thoughts in the comment section below.
Don't forget to follow us on Twitter, like our Facebook Fan Page and Add us to your circles on Google+ to keep you updated with the latest technology news, gadget reviews, launches around the world and much more
Tagged with 
About Pulkit Juneja
Pulkit Juneja, is the founder of Versed Tech. A born tech savvy guy who loves to write content on latest technology news, Gadget reviews, android app reviews, SEO and Much More. Connect with us at pulkit@versedtech.org