How to setup IP Canonicalization ?

We all regularly read Matt Cutts blog and Moz updates to improve our seo knowledge and ranking our website in google effectively. As many of us read on the internet is that a static IP (Dedicated IP) may reduce your duplicate content and its also good for better SEO right?

But I am saying that it’s also lead to increase duplicate content of your website or blog until you do not know about web hosting a bit. If you have dedicated IP for your blog then this article can be useful for you but I would recommend to everyone should know this..

What is Canonicalization?

Canonicalization is a process to select better website url for you if there are various options are available for example: I have installed SMF “Simple Machine Forum” on a VPS and when any user try to pull our forum forum then browser get various options to load our website such as.

Here your browser decides which url would be better option for you and this process called Canonicalization.

How dedicated IP can harm our ranking?

No doubt Dedicated IP address is better option instead of using shared hosting IP for your website however I wouldn’t recommend you to use IP if you do not know “How to setup IP Canonicalization“.

Because when google and many other search engine visit your website they will find same content on your domain name and your IP address as result they will list both options that doesn’t mean you will get better traffic due to this double indexing because it may lead to penalize your website.

What does IP Canonicalization?

Its simply redirect your IP address to your main domain name hosted with it.

How to setup IP Canonlization?

It wouldn’t take more than 5 minutes to configure it but it will keep safe your website and also improve your search ranking.

Step 1: If am not wrong you all has .htaccess file on your hosting server if not then create one now.

Step 2: Edit your .htaccess file online after taking backup of it.

Step 3: Set your IP address and Domain name according to bellow example code and save the .htaccess file.

RewriteEngine On

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

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

RewriteRule (.*)$1 [R=301,L]

Replace xxx\.xxx\.xxx\.xxx with your dedicated IP address allowed for your website and replace with your actual domain name.

After saving these lines in your .htacess file you must check your website on Private Browser for the confirmation by pulling up your website with IP address if its redirecting to your domain name then you have done everything correctly or if you are getting any error please let me know. I am here to help you out.


13 comments add your comment

  1. Hi
    Thanks For Sharing Good Information . But When i try with IP address it will redirect godaddy default page instead of my website page.

    Kindly Help me out this.

  2. Hello Rajesh,

    I have a VPS with a dedicated IP, I have Canonicalized my real server’s IP, but recently I started using the cloudflare and it has changed my IP.

    my question is how can I Canonicalize my cloudflare IP?


    • Unfortunately, you can not apply this method to CloudFlare IP addresses as they provide you shared IP which is being used by thousands of other customers at the same time. However, you can disable CDN and use their DNS only to make it possible.

    • Unfortunately No! Because CloudFlare assign you a shared IP address and Canonicalization can be set up on Dedicated IP addresses only

  3. This is The website which i am working on and i am also facing the same problem , can anyone please just check the issue with the it, Because it keeps on disappearing from google search results page after firing the query , and to make it reappear i need to fetch the website

  4. Hello Rajesh,

    I have a IP Canonicalization Problem on the Same EC2 Machine we are hosting different websites lets say 20 Domains.

    We have only a single IP Address.

    How can we resolve this Issue.


    • Yes you can do that but still it may create issue with loop redirection so not recommended, you can get additional IP’s from AWS at $1.5/mo

  5. Hi Rejesh,

    Good article.I tried above mentioned code in .htaccess file but still issue is not resolved.

Leave a Comment