I need code to allow uk only geoip in .htaccess

Hi, I’m not very experienced with .htaccess except for basic url rewriting.

Can someone point me to somewhere I can see what code to put in my .htaccess file to restrict visitors only to UK?

Thanks :slight_smile:

Here you go,
http://www.countryipblocks.net/country-blocks/htaccess-allow-format/

I should point out that all the big search engines like Google, Yahoo and Bing
are located in the USA so you will need to provide them with exceptions or
accept the fact you will not be indexed the same way as other sites.

In addition many of the advertising providers (Adsense,Adbrite,Clicksor etc) are
also in the USA and will want access to the site if you plan to carry advertising,
they want see what the content is so they can match up suitable ads.

Ah ok, I added an exception for USA.

Thanks for the link and the advice, that’s gonna come in really handy! :slight_smile: