Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will Google be able to access my website after blocking all US IPs?

I'm going to block all US IPs using .htaccess this way :

<Limit GET HEAD POST>
order deny,allow
deny from 3.0.0.0/8
deny from 4.0.0.0/25
deny from 4.0.0.128/26
deny from 4.0.0.192/28
deny from 4.0.0.208/29
....
allow from all
</Limit>

Will Google be able to access and index my website after blocking all US IPs?

EDIT : Sorry for the ambiguity, but I DO want Google to index my website.

like image 492
Ydhem Avatar asked Oct 07 '13 02:10

Ydhem


1 Answers

Although Google has its servers spread across the whole world, it would be quite hard to say where the search engine's bots mostly originate from. What I suggest would be to block the IP ranges but add an exclusion clause that matches against the User-Agent for search bots like:

SetEnvIfNoCase User-Agent (googlebot|bingbot|yahoo!\sslurp) is_search_bot

<Directory /docroot>
    Order Deny,Allow

    Deny from 3.0.0.0/8
    Deny from 4.0.0.0/25
    Deny from 4.0.0.128/26
    Deny from 4.0.0.192/28
    Deny from 4.0.0.208/29

    Allow from env=is_search_bot
</Directory>
like image 116
Ravi K Thapliyal Avatar answered Oct 03 '22 17:10

Ravi K Thapliyal