Archive

Archive for the ‘Webmaster Tools’ Category

Using .htaccess to block an IP Address

March 29th, 2008 Dave W No comments

For whatever reason, there may come a time when you want or need to block an IP Address or domain name from accessing your website. There are a number of ways to do this and I will demonstrate these below.

You need to start off by creating a .htaccess file and placing it in the directory for which you want it to take affect on. For example, if you block access to example.com, you would place the .htaccess file in the root/home directory of your website. If you wanted to block access to example.com/myfiles, you would place the .htaccess file in the myfiles directory.

Once you have worked out what part of your website you want to block access to, you will need to add the following to the .htaccess file:

order allow,deny
deny from 203.101.101.101
allow from all

This will refuse all requests made by the IP address 203.101.101.101. An error message similar to the following will be shown instead.

Ok, so now lets say you wanted to block multiple IP Addresses from accessing your site. You simply list the IP Addresses one per line:

order allow,deny
deny from 203.101.101.101
deny from 203.101.101.102
deny from 203.101.101.103
allow from all

You also have the ability to block an entire IP Address range. You can do this by not specifying the last octet in the IP Address:

deny from 203.101.101

This will restrict access to anyone who falls in the 203.101.101 to 203.101.101.255 address range.

Instead of using IP Addresses to restrict access, you can also use domain names as well:

deny from example.com

You should be careful when using the .htaccess file to block an entire IP Address range or domain name as it’s likely to block access to genuine users. Where possible, and unless you have a specific need to block an entire range or domain name, you would be in most cases better off specifying individual IP Addresses or domain names.

Categories: Webmaster Tools Tags:

Ajaxload – Ajax loading gif generator

March 22nd, 2008 Dave W 1 comment

For those of you who have ever created a website incorporating Ajax, you will generally use a animated gif as an indication to the user that things are happening, so please wait/be patient!

Well, I recently found myself in a situation where I already had an animated gif but I needed a new one.  The one I was using was plain and simple and I needed something a little more fancy.  So, I hit Google and started searching.  It took about 10 seconds and I stumbled across Ajaxload.info – a website that can generate an Ajax loading/please wait/be patient, gif.

So impressed with this website I was that I decided I would share it with you.

You simply choose the indicator type, a background color (or make it transparent), a foreground color and click generate.  In seconds, you have your Ajax loading gif.  Best of all, it is completely free!

If you need to generate your own Ajax loading gif, heading on over to www.Ajaxload.info – I don’t believe you will be disappointed.

AddThis – Bookmarking & Sharing Button

March 20th, 2008 Dave W No comments

AddThis is the #1 bookmarking and sharing button on the Internet. AddThis spreads your content across the Web by making it easier for your visitors to bookmark and share it with other people, again…and again…and again. Our simple yet powerful button is very easy to install and provides valuable statistics about the bookmarking and sharing activity of your users. AddThis is the perfect tool to help your visitors create a buzz for your site and increase its popularity and ranking.




Some of the buttons available are pictured above.  When you hover your cursor over them, a menu will appear with a group of sites including Digg, Google, Live and so on (all of which are customisable) that you can add your website to quickly and easily.

I highly recommend you check out http://www.addthis.com for more information!