Wordpress Tips : Block IP Addresses with .htaccess
Category Wordpress | Permalink | 5. March 2007
« Digging Alexa - how the geek demographic doubled overnight | Obama, Clinton try to woo black vote in Selma »
Facing spam, hooliganism, vandalism or would you just prefer showing your blog to a select few? With this tutorial, it is very easy to block users with the IP you have defined, from accessing your blog. Please note, this is not possible on WordPress.com hosted blogs.
If the .htaccess file is not already created, you should create a file named .htaccess in your blog’s root directory (usually http://www.myblog.com/) and fill it with the content below:
order deny,allow
deny from all
allow from xxx.xxx.xxx.xxx
Just change xxx.xxx.xxx.xxx to the ip you want to allow. You should now be able to access the file from http://www.myblog.com/.htaccess. Now your blog can only be accessed by the people with the IP you have set.
If you want to allow multiple IP addresses to access your blog, just create another record of IP like shown below:
order deny,allow
deny from all
allow from xxx.xxx.xxx.xxx
allow from yyy.yyy.yyy.yyy
allow from 111.111.111.111
To undo the changes, just delete the content from the .htaccess file or delete the .htaccess file itself. This trick is also helpful when you would like to do some updates for your blog. You can specify your IP to be allowed and then block all other IP addresses.
619 ReadRelated Posts
- Wordpress 2400 Theme pack 2 We made 2400 wordpress theme for you.you can download the best themes of the packet once time ins...
- What is OpenID for Wordpress OpenID is an open standard that lets you sign in to other sites on the Web using your WordPress....
- Wordpress 2400 Theme pack 1 We made 2400 wordpress theme for you.you can download the best themes of the packet once time in...
- WordPress Paged Comments Plugin WordPress Paged Comments is a plugin for WordPress 1.5 and 2.x to allow comment paging. Useful ...
- Wordpress phpBB Bridge WP-United is a new integration package that glues together phpBB, the leading open source bul...
- Fedafi Stand Alone RSS Generator, Wordpress Plugin and RSS publishing network for everyone Fedafi RSS Wordpress Plugin Download Fedafi RSS Wordpress Plugin To download Fedafi RSS Wordpr...
- 16 Top Tips For Your iPod Love them or hate them, they’re here to stay. Apple’s iPod is the top mp3 player on the market b...
- 83 Beautiful Wordpress Themes You (Probably) Haven’t Seen Sometimes it’s just like searching for a needle in a haystack: if you’ve ever googled for fr...
- Quickly and Easily Generate a Fresh WordPress installation If you build websites using WordPress, your life is about to get a lot easier. It’s simple....
- WP SEO Tips: Tag You are It Today we are talking about the actual code of the page. We will put touching on two points. Head...































































