Questions
-
Moz can't crawl domain due to IP Geo redirect loop
Hi, If you have manually set up your geo redirect in your htaccess then you could modify your rules to redirect only if not Moz’s crawler (rogerbot) like this: uk redirect RewriteCond %{HTTP_USER_AGENT} !=rogerbot RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^GB$ RewriteRule ^(.*)$ http://uk.abcd.com$1 [L] Which means both conditions must be satisfied before the redirect happens, the user agent must not be rogerbot, and then it checks the country code. You may have to adjust it a bit depending on your setup but it’s just the same as adding an exception based on IP, so if you could already do that you can set up a user agent condition just as easily. If you’re using PHP you could use $_SERVER['HTTP_USER_AGENT'] wrap your geoip function with something like: if($_SERVER['HTTP_USER_AGENT'] != 'rogerbot' ){ You will have to check if it is not empty before you implement it (or work it into your code) as some servers have $_SERVER['HTTP_USER_AGENT'] as not set. Thanks, hope that gives you a few ideas to try! Tom
Link Explorer | | TomVolpe0