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
-
Canonical - unexpected page ranking
We are getting good ranking for an unexpected page, rathewr than the one we were trying to get ranking for. Should we put a canonical on the 'unexpected page' to the page we would like to receive the ranking for - or do we risk losing the ranking? Any suggestions welcomed. Ian
Intermediate & Advanced SEO | | Substance-create0 -
Linking from & to in domains and sub-domains
What's the best optimised linking between sub-domains and domains? And every time we'll give website link at top with logo...do we need to link sub-domain also with all it's pages? If example.com is domain and example.com/blog is sub-domain or sub-folder... Do we need to link to example.com from /blog? Do we need to give /blog link in all pages of /blog? Is there any difference in connecting domains with sub-domains and sub-folders?
Intermediate & Advanced SEO | | vtmoz0 -
Product Schema & Google Guidelines
Hi We have product mark up on our site, data-vocab rather than schema. I can't see it showing in Google SERPs, but when testing it appears to be correct. Are Google still selective with what schema they show for a site? Thanks
Intermediate & Advanced SEO | | BeckyKey0 -
Canonical URL availability
Hi We have a website selling cellphones. They are available in different colors and with various data capacity, which slightly changes the URL. For instance: Black iphone, 16GB: www.site.com/iphone(black,16,000000000010204783).html White iphone, 16GB: www.site.com/iphone(white,16,000000000010204783).html White iphone, 24GB: www.site.com/iphone(white,24,000000000010204783).html Now, the canonical URL indicates a standard URL: But this URL is never physically available. Instead, a user gets 301 redirected to one of the above URLs. Is this a problem? Does a URL have to be "physically" available if it is indicated as canonical?
Intermediate & Advanced SEO | | zeepartner0 -
Drupal Alinks is this good to use?
Hi, https://drupal.org/project/alinks We have 1,000's of Soft links created like this in 1,000's of pages Each page 1 to 2 links that are soft links would this be fine? SEO would this be good or should we remove it Thanks
Intermediate & Advanced SEO | | mtthompsons0 -
Are pages with a canonical tag indexed?
Hello here, here are my questions for you related to the canonical tag: 1. If I put online a new webpage with a canonical tag pointing to a different page, will this new page be indexed by Google and will I be able to find it in the index? 2. If instead I apply the canonical tag to a page already in the index, will this page be removed from the index? Thank you in advance for any insights! Fabrizio
Intermediate & Advanced SEO | | fablau0 -
Canonical referencing and aspx
The following pages of my website all end up at the same place:
Intermediate & Advanced SEO | | IPROdigital
http://example.com/seo/Default.aspx
http://example.com/SEO/
http://example.com/seo
http://example.com/sEo
http://example.com/SeO but we have a really messy URL structure throughout the website. I would like to have a neat URL structure, including for offline marketing so customers can easily memorize or even guess the URL. I'm thinking of duplicating the pages and canonical referencing the original ones with the messy URLs instead of a 301 redirect (done for each individual page of course), because the latter will likely result in a traffic drop. We've got tens of thousands of URLs; some active and some inactive. Bearing in mind that thousands of links already point in to the site and even a small percentage drop in traffic would be a serious problem given low industry margins and high marketing spend, I'd love to hear opinions of people who have encountered this issue and found it problematic or successful. @randfish to the rescue. I hope.0 -
Canonical Tag - Question
Hey, I will give a thumbs up and best answer to whoever answers my question correctly. The Canonical Tag is supposed to solve Duplication which is fine. My questions are: Does the Canonical Tag make the PR / Link Juice flow differently? If I have john.long.com/home and john.long.com but put a Canonical Tag on john.long.com/home reading john.long.com then what does this do? Does it flow the Link Equity back to john.long.com? Can you use the Canonical Tag to change PR flow in any means? If I had john.long.com/washing-machines and john.long.com/kids-toys... If I put a Canonical Tag on john.long.com/kids-toys reading john.long.com/washing-machines then would the PR from /kids-toys flow to /washing-machines or would Google just ignore this? (The pages are completely different in this example and content is completely different). Thank you.
Intermediate & Advanced SEO | | AdiRste0