IP Canonicalization – Url Canonicalization Solution by htaccess and Web.config

What is a canonicalization ?

“Canonicalization is the process of picking the best url when there are several choices, and it usually refers to home pages. For example, most people would consider these the same urls:

www.example.com

http://example.com/

www.example.com/index.html

example.com/home.asp

But technically all of these urls are different. A web server could return completely different content for all the urls above. When Google “canonicalizes” a url, we try to pick the url that seems like the best representative from that set. ” – Matt Cutts

solution for IP canonicalization - URL canonicalization
solution for IP canonicalization – URL canonicalization

How to check IP Canonicalization for Web-Site?

To check IP Canonicalization, typing a site IP address in the addressbar of browser and will still lead you to the same website instead of redirect to website’s URL that mean website IP not Canonicalization.

Be careful for website, if your server IP is not forwarding to your website’s domain name. Search engines like Google or any other are now able to index your website with its IP instead of its domain name. This will result in duplicate content. For solutions of IP Canonicalization you should do an htaccess 301 redirect to your domain url to make sure the IP does not get indexed.

Importance of Canonicalization in SEO

When any search engine robots crawling a website, it gathers as much information as possible about the website. it may also include the IP address.

For Site, if IP not Canonicalization than the problem are  robot collect same information of website with IP adress url that they already collected with domain name.

Because

http://xxx.xxx.xxx.xxx/index.php 
&
http://domain.com/index.php

both are technically different and search engines may process this differently .

hence, Search engines show duplicate content found on website and will split the rankings of site.

For strong SEO,  IP Canonicalization issue can be fixed by 301 redirect and become sure that the IP does not get indexed.

Solution for set up a 301 redirect for IP Canonicalization  in Apache linux server by using the .htaccess file that found in the website root directory.

IP Canonicalization Solution for linux server with .htaccess file

The Syntax for .htaccess file to 301 redirect IP address to Domain Url is following:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^xxx\.xxx\.xxx\.xxx [nc,or]

RewriteCond %{HTTP_HOST} ^example\.com [nc]

RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

replace xxx with the your IP address and domain with your domain name.

Solution for Windows IIS server with Web.config file

add following rule in web.config file

	
	
	    
               

	
	

In Website, if you have a page that most of content that are same with others page and possibility to detect it as a duplicate by any search engine than you can use link tag for solution of Url Canonicalizaion inside the head tag of Page.

Like,

;

It tell Google, Yahoo! and all other Search engine crowlers  that the current page should be treated as though it were a copy of the URL www. lathiyasolutions.com/blog and that all of the link & content apply should technically flow back to that URL and don’t mark current crawling page content as a duplicate.

Leave a Comment

Scroll to Top