How to solve if you get “IP Canonicalization Test Failed” message as result?

I - Never forget about IP and URL Canonicalization

I – Never forget about IP and URL Canonicalization

First and foremost: keep calm (we’ll solve this issue together).
Then, check your Google account, how – that is in what form: with or without www – you submitted (registered) your site on Google at the very beginning. It is a very important step, because this will be the base to decide whether your IP canonicalization is adequate or the related tests will lead to Failed results.
If you’ve followed my previous posts about IP and URL Canonicalization, you could learn how to use some of these testing and checker tools. If you were not familiar with the terms, please visit my page: “IP and URL Canonicalization Checker Services and Tools: What is canonicalization and how to check it?“.

So, let’s begin and see this primary step I’ve mentioned above, before doing anything else.

1. Go to your Google Webmaster account and examine the current status of your site:

As usually, I’ll use my own site (it is the right form of using the URL, that is this WordPress site address has been canonicalized to this form, without www) because it is mine and it will not hurl anybody’s rights if I make some experiments or do some tests on it.
On the Home Page of Google/Webmasters/Tools (as they call it: Search Console) you’ll see the thumbnail of your site (or sites, if you have more). Don’t forget: you have to be signed in with your proper @gmail account to see this page and the data of your site(s).
Near by the thumbnail of your site, you can recognize the way you are using this URL on/by Google: Search Console - How To Solve If You Get IP Canonicalization Test Failed Message Google -Webmasters-Tools Search Console with the thumbnail of - How To Solve If You Get IP Canonicalization Test Failed MessageOnce again: this is the correct address – without www – of the site address of mine, and this is the ONLY correct one for This my so-called Preferred Domain Name. I’ll show you in the next section, why.

WARNING! If you find your site here with and without www, it means – in spite of the fact that you have written only ONE Text “physically” for the content – your site content is considered to duplicate in the eyes of Google! In this case it is quite sure you’ll get IP Canonicalization Test Failed message, not to mention the possible disadvantages of this situation.
Unlike e.g. on Bing (where you have to add both), your site address may appear only ONCE on Google.

What to do if your site appears TWICE (with AND without www) on the Search Console of Google Webmasters?

By my previous experience, in most cases this causes the Duplicate Content. The solution seems to simple: you MUST delete one of the two, leaving your Preferred Domain live.
But, how can you decide which form is the proper one?
I’ll show you the easiest solutions on WordPress, or non-Wordpress sites.

How to check the current URL (address) of your site on WordPress?

The quickest way is to check out the Settings on your own WordPress Dashboard:

Go to Dashboard > Settings > General Settings. Here you’ll find the settings. Two lines are the most important ones just now: WordPress Address (URL) and Site Address URL. Let’s see the accompanied screenshot:

WordPress Dashboard of - General Settings - How To Solve If You Get IP Canonicalization Test Failed Message

WordPress Dashboard of – General Settings – How To Solve If You Get IP Canonicalization Test Failed Message

As you can see above, either you check Google Webmaster /Search Console above or this WordPress Dashboard General Settings of the site, the URLs are exactly matching ones: Additionally, if you read my previous posts and see the results we got here, you can state that the IP Canonicalization of this site is correct.

Note: You can use your default URL address with or without www, it doesn’t matter from this aspect. What counts is using it consequently.

If you find here different addresses (Google Webmasters AND WordPress Dashboard), the best solution is to correct it. You’ll have two opportunities:

1. Using your WordPress site data as the base address – simpler action

You’ll consider the data of your WordPress site to the base of your URL (Preferred Domain name). In this case, go to Google Webmasters and delete the not appropriate one, and add the correct one after this action. This will be your so-called Preferred Domain.
Don’t be afraid of Google punishment anymore, you’ll be rewarded for correcting your errors. Re-submit your sitemap, check robots.txt and re-submit all of your links after the action. After a week or two your results will come back.

2. Using the data on Google Webmasters as the base address – a bit complicated but not impossible. Nonetheless, take care!

After you had ensured you have only  ONE URL added on Google Webmasters – it doesn’t matter whether it is with or without www), go to your WordPress Dashboard > General Settings, and change both addresses (WordPress Address (URL) AND WordPress Site Address ) exactly to the same as it is on Google Webmasters.
But, be very careful! After you changed the current URL on your WordPress dashboard, WordPress software will log you out. If you mistyped the addresses, you will NOT be able to log back to your site, until you solve this with correcting this mistake withnin your database (MySQL). So, double-check all parameters before changing anything and taking the action.

When your changes had been done, please check your IP and URL canonicalization using some of the tools I’ve mentioned, or others.

Note: however WordPress sites use .htacess file (the file containing various Re-Write Rules and Conditions), I do NOT suggest you messing it up with various, own-created rules. Why? Not only the WordPress itself, but different (e.g. SEO) plugins may also use the .htacess file. When you change the content of .htacess, it may cause malfunction in their work and the site will become useless. DO NOT touch this .htaccess file unless you are an Expert and know well what you are doing.  

What to do against the “IP Canonicalization Test Failed” message on non-WordPress sites?

Being aware of the data on Google Webmasters, you can decide which way to choose from:

1. The simpler, experimental way:

If your site failed the IP Canonicalization test, your content comes up surely as a duplicate in Google’s eyes. In this case, it is quite sure that the redirection included in your .htaccess file is NOT matching the URL you had submitted on Google Webmasters as your Preferred Domain.
The easiest way is to change this Preferred Domain Name (address) from www to without www, or vice versa – it depends on the initial data.
Please try this way first, and do a test again. Do you think is it so experimental? Yes, it is. If you fail, you will be forced to touch your .htaccess file. Let’s see it below:

2. A bit complicated and risky way (only for experts!):

We can also manage these re-directions with “.htaccess” (supposing Apache Server). In this case, you’d need to edit this .htacess file in order to handle this issue. IWith other words, let’s follow the htaccess ReWrite Rules for Canonical URLs.

First of all, save your .htaccess form the root directory of your site to your hard drive (or SSD, it doesn’t matter, but safe place). Now, edit it following this way:

a. If you want your domain to be with www as preferred – that is force www access -, place this script at the beginning of your .htaccess file:

# Explanation: Always use www in the domain
# Replace “” with your domain name
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([a-z.]+)?example\.com$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .?{REQUEST_URI} [R=301,L]

b. If you want to use your domain without www – that is force NON-www access -, then see this script and place it at the beginning of your .htaccess file:

# Explanation – Never use www in the domain
# Replace “” with your domain name
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(([a-z0-9_]+\.)?example\.com)$ [NC]
RewriteRule .? http://%1%{REQUEST_URI} [R=301,L]

These were the ReWrite Rules for URL Canonicalization (a part of Apache mod_rewrite commands), regarding to an Apache Server. You can copy – paste – and replace with your parameters the appropriate command lines if you want, but double check your work before you put them live. Always make a backup copy of your files before doing anything!

Another approach to manage domain – and page, post – redirections:’s Guidance to Redirects

If you want to find other ways for the redirection from one domain to another – including pages and posts -, please visit’s website and read their guide: Comprehensive guide to .htaccess- Redirects, please. It is really worth to visit their site because you can find other applicable tools which may ease your developer work. These tools can be used either in Apache of Non-Apache environment.’s htaccess Redirect Generator and Redirect Checker

However, I haven’t mention a newish site: yet, it is worth to visit it. They are well equipped with useful entirely Free SEO Tools, so they offer a htaccess Redirect Generator, too.
With this tool you’ll be able to generate a code for yourself either you want to make Canonicalization or a page redirection simply. Please visit their page if interested: Htaccess Redirect Generator By
They are also equipped with a Redirect Checker which deserves to speak some words about.

How does Redirect Checker of work?

If you add the address of your site with and without www to their checkbox, it will display whether your URL is redirected to another URL or not. Nonetheless, only this test itself is not enough to determine the current IP Canonicalization status of your site, yet simple and effective way to check the current redirection at once. In order to avoid duplicate content, the test result MUST match your Google status (remember Google Wabmaster section above on this post).
Let’s see a quick test on my site:

URL Rediect Checker of - analyzing - How To Solve If You Get IP Canonicalization Test Failed MsgThe results of the URL Redirection Test – assessment:

Line 1: does NOT redirect to anywhere.

Line 2: DOES redirect to It means: the IP Canonicalization of the site is correct. IF this is the Preferred Domain Name on Google, it will NOT cause duplicate content, the canonicalization of the site is correct.

Of course, you can find other excellent solutions on the Internet. I wanted only to show you some opportunities.

Conclusion and Summary

As you see above, it is not so easy to cope with these redirections, setting up new ReWrite rules concerning IP canonicalization test failed results. If you are an expert, you can do the job, however, even if you are a master of this field you can’t ignore some kind of precautions and must keep the rules. If you fail, the site will fail to load also. You’ll also need permission for the root directory of the entire site to correct any errors.
Warning! Beginning this work without having the appropriate permission and the necessary knowledge is more then risky. So, please take care with any changes and double check the data before changing them.
I gave you only advice today, and neither being aware of nor knowing the structure of your site and the conditions under it is working, I’ll take no responsibility if you misunderstood, misinterpreted or misdone something following these methods I wrote. 

I wish you never get such kind of message like “IP Canonicalization Test Failed” anymore. Today I wanted to show you how to solve this issue, together with the way how avoid duplicated content, and how to avoid search engine penalties (as the possible side-effects of this). I do believe I could help you.

Thank you for visiting and reading!

Gyula Olah electrical engineer, author, publisher, the owner of SEO Service Guide site.

New SEO software tool

SEOprofiler is a cool web-based SEO software tool that helps you to get high rankings on Google, Yahoo and Bing. You can also check the backlinks, Google rankings and Google AdWords of any website for free. Just enter a domain name in the following search box:

SEO Rank Monitor - The Most Complete Ranking Tracker

Just another complex SEO SolutionSEO Rank Monitor (Try it for 14 Days FREE!):

SEO Rank Monitor - The Most Complete Ranking Tracker

Leave a Reply