Canonicalization : 301 Redirect to Prevent IP Duplicate Content
Canonicalization, Google SEO 2 Comments »It seems Google’s spiders have a habit of indexing a site by not only it’s domain name but by it’s IP address. To find out if your site has been indexed by IP as well as domain name, go to Google and do the following two searches :
site:mysite.com (and) site:xxx.xxx.xxx.xxx
where mysite.com is your domain and xxx.xxx.xxx.xxx is your sites IP address. If you see any results for the search by your IP address, Google is indexing you by IP and it’s not been proven or disproven that this will result in duplicate content. In that Google is an automated system, as an SEO, you must learn to take the human factor out of the algorithm and optimize your site for furthive pitfalls such as this and ensure that the search engine spiders are finding things the way you want them to find them.
I guess you could always do an .htaccess 301 redirect to make sure the IP doesn’t get indexed and to fix canonicalization.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^xxx\.xxx\.xxx\.xxx [nc,or]
RewriteCond %{HTTP_HOST} ^mysite\.com [nc]
RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
This .htaccess rewrite code will not only redirect IP requests but it will also redirect requests for mysite.com to www.mysite.com
All you have to do is swap out the xxx’s with your IP and mysite with your domain name.
Hope this helps ![]()
