After a database server migration, I've noticed that GoogleBot started getting errors when trying to crawl my site.

The reason seems to be that it is hitting my site via IP address (and due to my config setup, my PHP scripts try to hit the old database server, which has been shut down). When the site is accessed by correct hostname, it uses the new DB server.

I can fix this by pointing the 'IP address' config to use the new DB server, but ideally I want to tell GoogleBot (and also Bing) to stop accessing via IP, and use hostname instead.

Google Webmaster Tools also shows a lot of entries for 'sites linking in' to my website, which are actually listed as the IP address of my site, as if it were a different site.

I do not want to lose SEO value by making the wrong move.

Should I change my website to stop responding on IP address? Or set up HTTP redirects from IP address/url -> hostname/url?

I already have "rel canonical" URLs which include the FQDN on a lot of my pages, but Google does not seem to respect them, or at least it continues to hit the IP address for those pages.


Looks like you asked and answered your own question.

The popular suggestions seem to be setting up a 301 redirect, stopping your http server from responding to IP requests, setting up "rel canonical" urls, or trying to put no follow on links to the old database. (I think I'd try removing the old db links from the scripts first, but anyway...)

  • Thanks. The connection to the old db was left in by mistake, since I hadnt realised there was a separate config block for when the site is accessed via IP. I'll give the 301 a try, but Google Webmaster Tools is very confusing because it wont let me inform it that Ive setup redirects when its an IP – carpii Aug 15 '12 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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