Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm in process to block a particular geolocation from accessing my site. But i am not sure if this is going to raise any flags on my website. Basically i'm getting lots of spam from particular state and there are some webmaster copying my content without any attribution or backlink. I feel that is enough and i wish to save my bandwidth on that state or geolocation.

So my question is how to block particular geolocation ? Do you have any suggestions for php scripts that help block particular geolocation ? and another question: if there are any SEO disadvantages ?

share|improve this question
    
When you say "state", do you mean one of the United States, or a state in another country, or a whole country in general? –  DisgruntledGoat Nov 18 '11 at 16:38
    
Not united states but another state in China. If possible i don't mind blocking entire country. –  Mahesh Nov 20 '11 at 19:43
add comment

1 Answer

up vote 1 down vote accepted

There are many geolocation scripts and services out there, just search. Here's a PHP one for example. Usually you can get quite fine-grained location data.

As for SEO, it could harm your SEO if you block a search engine from accessing your website. Google has a limited presence in China, and Googlebot mostly (if not exclusively) operated from the USA. However other search engines like Baidu are popular.

You could first check whether the visitor is a search engine - e.g. check for "Googlebot" of "Baidu" in the user agent string. If they're not a search engine, run your geolocation check and block them if they match your target area. (Note, if they are specifically targeting your site there's a possibility they may get wise to this tactic and spoof the user agent.)

share|improve this answer
    
I checked the serverlogs and this seems to be user posting comments. Definitely bot posting spam comments. I do have baidu in search engine list but they hardly pass traffic to my site. –  Mahesh Nov 21 '11 at 14:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.