Canonical Fix Value & Pointer To Good Instructions?
-
Could you tell me whether the "canonical fix" is still a relevant and valuable SEO method?
I'm talking about the .htaccess (or ISAPI for Microsoft) level fix to make all of the non-www page URLs on a website redirect to the www. version - so that SEO "value" isn't split between the two.
I'm NOT talking about the newer <rel= canonical="" http:="" ...="">tag that goes in the HEAD section on an HTML page - as a fix for some duplicate content issues (I guess). </rel=>
I still hear about the latter, but less about the former. But the former is different than the latter right - it doesn't replace it?
And I'm not sure if the canonical fix is relevant to a WordPress-based website - are you?
Also I can never find any page or article on the Web, etc. that explains clearly how to implement the canonical fix for Apache and Microsoft servers. Could you please point me to one?
Thanks in advance!
-
Yes it is still relevant, the www is a old unix standard but is not nesasary today and i believe makes domain names less memerable and is a confusion when talking of root and sub domains.
Your in luck, I just finished a tutoiral for microsoft IIS servers. i will be doing more including how to do this in code, but for now, i only have the Domain name fix
-
Hi Denis.
When you refer to "canonical" most everyone will believe you are referring to the canonical meta tag.
With respect to the .htaccess "fix" you are referring to, it is a 301 redirect. When you purchase a domain such as "myexample.com", you are buying rights to a combination of a Top Level Domain (such as .com) plus a domain. You can add "www" or almost any prefix to the domain, but that is referred to as a sub-domain.
The confusion: when the internet began most site names used the "www" subdomain to represent themselves. It became a standard. Later some site owners wanted to shorten their URL and dropped the subdomain. To help this process most hosts set a default to where the www subdomain mirrors the root domain. This mirroring is NOT required and does not occur on all servers. Any site could should to show completely different content on their www subdomain from their root domain. Simply put, www.myexample.com <> myexample.com. They are two different URLs which could show completely different content.
Search engines understand the above information and therefore if your site does not contain a proper 301 redirect or other adjustment for your www vs non-www URL format, your website will be duplicated. When users search for your web pages, some will appear in the search engines index with the www prefix, and others without. The real issue is when users link to your website, they will link to both formats of the URL and thereby split your backlink authority. This is a major SEO issue.
To fix the problem a 301 redirect needs to be placed using a Regex expression. Regex is a replacement computing language. The statement basically will say "if anyone tries to access a web page on my site that does not show a sub-domain, redirect the user to the same page on the www subdomain".
This process is still highly relevant to SEO, and will continue to be relevant for years. The only way for it to realistically stop being relevant is for servers to stop mirroring the www and non-www URLs. This process is relevant to WordPress and every website regardless of what software is chosen to produce the site.
The HTACESS code is below. I do not work with IIS so perhaps someone else can assist you with that code. Either way, you likely have managed hosting in which case I highly advise you asking your web service provider to make the change. The .htaccess file controls all access to your site. The slightest error of any nature can instantly bring your site offline, or cause major SEO or security issues. Even using the correct code in the wrong order can cause issues. It is simply not a place for anyone other then a trained web server tech to be working.
Redirect www to non-www:
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC] RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]
Redirect non-www to www:
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^yourdomain.com [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Does anyone know how to fix this structured data error on search console? Invalid value in field "itemtype"
I'm getting the same structured data error on search console form most of my websites, Invalid value in field "itemtype" I take off all the structured data but still having this problem, according to Search console is a syntax problem but I can't find what is causing this. Any guess, suggestion or solution for this?
Intermediate & Advanced SEO | | Alexanders0 -
Canonical and Alternate Advice
At the moment for most of our sites, we have both a desktop and mobile version of our sites. They both show the same content and use the same URL structure as each other. The server determines whether if you're visiting from either device and displays the relevant version of the site. We are in a predicament of how to properly use the canonical and alternate rel tags. Currently we have a canonical on mobile and alternate on desktop, both of which have the same URL because both mobile and desktop use the same as explained in the first paragraph. Would the way of us doing it at the moment be correct?
Intermediate & Advanced SEO | | JH_OffLimits3 -
Magento & Accelerated Mobile Pages
Hi Folks, With Google rolling out changes to AMP & webmasters being encouraged to implement AMP.
Intermediate & Advanced SEO | | Patrick_556
Has anyone had any experiences implementing AMP for Magento Ecommerce. I understand that AMP is primary for articles & blog posts, but assuming AMP could be implemented on Product Pages, they would load faster & offer a better user experience & a step in the right direction What do you guys think? Many Thanks,
Patrick0 -
Rich Snippets For Q&A Forums?
As Google seems to have new interest in Rel Author for articles, is there anything comparable for q&a comments, where you have many commenters? IMHO, Google is trying to get at the quality of the authors advice via authority of some kind, especially for YMYL content. Best... Mike
Intermediate & Advanced SEO | | 945011 -
SEO before Replatforming - Good Idea?
Hello, We are in the midst of a major replatforming of our current website, the process will take roughly six to nine more months to complete. We are completing revamping our site - the new site will be on the same domain, but almost everything is changing - from the category structure, hierarchy, architecture, different regions on separate URLs will not be on the same with a currency converter, URLs - you name it, we're changing it. There has been internal discussions for some time on whether we should hire an outside firm to help us with our SEO. I have a lot of experience in SEO but my role has changed recently and we have had trouble filling my previous role. We are not looking for help with the replatforming project, we have a great plan in place to preserve link equity, tags, etc. We are looking for general SEO help as if replatforming wasn't on the table. My question is, is this smart to do before replatforming? In my opinion, it's not. Our new site will have completely different URLs and will be so dramatically different. We could have someone do some keyword research, but we have already done the bulk of it. We have thought about and researched keywords for every new page we are creating. But from a technical SEO perspective, I don't see the point in getting someone. In addition, we just had a major SEO audit done last year and we completed the tasks from that audit on the current site; however, most of the changes were technical, not content based. Thoughts?
Intermediate & Advanced SEO | | Colbys0 -
Google Places & Multiple Listings
Our client used to have a listing in each city, but after updating the addresses they were forever under review. Google said that businesses serving customers at their locations can only list their primary office. Back when this client had multiple city listings, all addresses but one were UPS boxes. If they are to change back to "No, all customers come to the business location," can they once again submit a listing for each city using these addresses? Yes, I realize they are UPS boxes, but they insist on being listed for each city.
Intermediate & Advanced SEO | | elcrazyhorse0 -
Status Code: 404 Errors. How to fix them.
Hi, I have a question about the "4xx Staus Code" errors appearing in the Analysis Tool provided by SEOmoz. They are indicated as the worst errors for your site and must be fixed. I get this message from the good people at SEOmoz: "4xx status codes are shown when the client requests a page that cannot be accessed. This is usually the result of a bad or broken link." Ok, my question is the following. How do I fix them? Those pages are shown as "404" pages on my site...isn't that enough? How can fix the "4xx status code" errors indicated by SEOmoz? Thank you very much for your help. Sal
Intermediate & Advanced SEO | | salvyy0 -
Techniques to fix eCommerce faceted navigation
Hi everyone, I've read a lot about different techniques to fix duplicate content problems caused by eCommerce faceted navigation (e.g. redundant URL combinations of colors, sizes, etc.). From what I've seen suggested methods include using AJAX or JavaScript to make the links functional for users only and prevent bots from crawling through them. I was wondering if this technique would work instead? If we detect that the user is a robot, instead of displaying a link, we simply display its anchor text. So what would be for a human COLOR < li > < a href = red >red < /a > < /li >
Intermediate & Advanced SEO | | anthematic
< li > < a href = blue>blue < /a > < /li > Would be for a robot COLOR < li > red < /li >
< li > blue < /li > Any reason I shouldn't do this? Thanks! *** edit Another reason to fix this is crawl budget since robots can waste their time going through every possible combination of facet. This is also something I'm looking to fix.0