Answer the question
In order to leave comments, you need to log in
How to allow search robots to access the site when htaccess is set to prohibit access from foreign countries?
I welcome everyone!
The essence of the problem: I have an htaccess file on my site, which lists a number of countries from which access to the site is prohibited "As a method of partial fight against spam. Spam from foreign IPs comes through an open feedback form"
But because of the above method, search robots do not can get to the site, as a result of which I cannot run contextual advertising from Google Adwards "my site does not pass the test, due to the unavailability of the target url".
Question: how can you make sure that only google and Yandex robots have access to the site from abroad, and no one else? Thanks in advance!
htaccess content
GeoIPEnable On
SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE UA BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE BY BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE FR BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE DE BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE US BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE UM BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE GB BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE UK BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE KZ BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE IT BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE CA BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE LU BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE NO BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE RO BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE IR BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE CL BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE AN BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE NL BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE BG BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE UZ BlockCountry
Deny from env=BlockCountry
Answer the question
In order to leave comments, you need to log in
In the feedback form, make a check from the robots.
It is better to remove the ip check, because. now the Russians are scattered all over the world.
Google comes from the USA, Yandex from Russia and Turkey
if they are allowed - you can almost not bathe
Google checks come from India and the Philippines, for example
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question