IP canonical URL issue

IP canonical URL issue - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the IP canonical URL issue error on your web browser. Problem :


So I did a search engine optimization test today and one thing it came back with was:




Your site's IP XX.XXX.XXX.XX does not redirect to your site's domain name. This could cause duplicate content problems if a search engine indexes your site under both its IP and domain name. Consider using a 301 re-write rule in your .htaccess file so that your site's IP points to your domain name."




I have looked but I can't seem to find a clear answer on how to do this, I need to know what I would put into the .htaccess file? There was something over at Stack Overflow but I'm not sure that's right.


Solution :

This warning is innocuous since IP addresses can serve multiple hosts and are not expected to redirect to one particular domain.



Prior to being concerned with this, you should first check if accessing the IP address even returns the same content as your domain. Even if it does however, search engines like Google will not penalize your site for duplicate content unless it appears to be spammy (e.g., intentionally scraping site content from another site), as indicated here:



Cutts on similar website content, multiple domains: Duplicate or safe?



You probably want something like this depending on what your canonical URL is:



Options +FollowSymLinks
RewriteEngine on
# Redirect IP/non-canonical domains
RewriteCond %HTTP_HOST ^example.com [OR]
RewriteCond %HTTP_HOST ^11.22.33.44 <-- Server IP here.
RewriteRule (.*) http://www.example.com/$1 [R=301,L]


You may already have something similar in your .htaccess if you redirect www -> non-www or vice versa.



edit - please remove the <-- Server IP here once you insert your own server IP.


We hope that this article has helped you resolve the redirects, canonical-url, ip-address error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

Redirected urls show in serp, with the original permalink but with the title and meta of the target page

How can I redirect everything but the index as 410?

How do I redirect traffic only if being accessed from a specific port?