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

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.

share|improve this question

migrated from serverfault.com Aug 15 '12 at 5:37

This question came from our site for professional system and network administrators.

1  
    
Thanks for the link, I knew 301's are the way to go when moving domain, but wasnt sure that it was the right way to tell Google to use the domain name rather than raw IP –  carpii Aug 15 '12 at 5:48
add comment

1 Answer

up vote 2 down vote accepted

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...)

share|improve this answer
    
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
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.