I submitted a site to Google using their tool.

At the time I didn't actually have a domain for the site, so I just used the IP address.

Later I bought a domain, but Google still seem to be showing the version with the IP address before the domain one.

How do I get it to stop showing the IP address version?


Do a 301 redirect from the IP address to the domain. If you're using Apache you can place this snippet in a file called .htaccess placed inside your root web directory:

RewriteCond %{HTTP_HOST} ^121\.12\.12\.123
RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]
| improve this answer | |
  • 1
    How long do you need to wait for this to work? – user38416 May 6 '14 at 20:03
  • 1
    The redirect would take effect immediately. Google would start showing the domain name in the search results within a few days of crawling a page. It might take two or three weeks for Google to crawl all the pages on your site. – Stephen Ostermiller May 6 '14 at 20:07

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.