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
-
Question on Indexing, Hreflang tag, Canonical
Dear All, Have a question. We've a client (pharma), who has a prescription medicine approved only in the US, and has only one global site at .com which is accessed by all their target audience all over the world.
Intermediate & Advanced SEO | | jrohwer
For the rest of the US, we can create a replica of the home page (which actually features that drug), minus the existence of the medicine, and set IP filter so that non-US traffic see the duplicate of the home page. Question is, how best to tackle this semi-duplicate page. Possibly no-index won't do because that will block the site from the non-US geography. Hreflang won't work here possibly, because we are not dealing different languages, we are dealing same language (En) but different Geographies. Canonical might be the best way to go? Wanted to have an insight from the experts. Thanks,
Suparno (for Jeff)1 -
Canonical Chain
This is quite advanced so maybe Rand can give me an answer? I often have seen questions surrounding a 301 chain where only 85% of the link juice is passed on to the first target and 85% of that to the next one, up to three targets. But how about a canonical chain? What do I mean by this:? I have a client who sells lighting so I will use a real example (sans domain) I don't want 'new-product' pages appearing in SERPS. They dilute link equity for the categories they replicate and often contain identical products to the main categories and subcategories. I don't want to no index them all together I'd rather tell Google they are the same as the higher category/sub category. (discussion whether a noindex/follow tag would be better?) If I canonicalize new-products/ceiling-lights-c1/kitchen-lighting-c17/kitchen-ceiling-lights-c217 to /ceiling-lights-c1/kitchen-lighting-c17/kitchen-ceiling-lights-c217 I then subsequently discover that everything in kitchen-ceiling-lights-c217 is already in /kitchen-lighting-c17 and I decide to canonicalize those two - so I place a /kitchen-lighting-c17 canonical on /kitchen-ceiling-lights-c217. Then what happens to the new-products canonical? Is it the same rule - does it pass 85% of link equity back to the non new-product URL and 85% of that back to the category? does it just not work? or should I do noindexi/follow Now before you jump in: Let's assume these are done over a period of time because the obvious answer is: Canonicalize both back to /ceiling-lights-c1/kitchen-lighting-c17 I know that and that is not what I am asking. What if they are done in a sequence what is the real result? I don't want to patronise anyone but please read this carefully before giving an answer. Regards Nigel Carousel Projects.
Intermediate & Advanced SEO | | Nigel_Carr0 -
WooCommere Canonical links relating to products and subscriptions
Hello, Thanks for taking the time to have a read of this, I'm not quite sure of the best way to address this issue. I have a WooCommerce site with Products and Subscriptions, i.e subscribe to buy the product monthly. Because of the way WooCommerce works these are effectively two different pages, for example: https://formnutrition.com/plant-based-nutrition/form-superblend-plant-based-vegan-protein/ and https://formnutrition.com/plant-based-nutrition/superblend-protein-subscription/ Since the second is just a Subscription of the first (Product) it's basically exactly the same content. I'm not sure if I should make the canonical link of the Subscription point to the Product? I would prefer that customers find the Product first and don't want Google to think this is duplicate content. On the other hand it's not strictly duplicate content as they are two different things? Is there any advice or best practice on how to handle this? Many thanks, Damian
Intermediate & Advanced SEO | | damo_form0 -
How (or if) to apply re canonical tags to Shopify?
Anyone familiar with Shopify will understand the problems of their directory structure. Every time you add a product to a 'collection' it essentially creates a duplicate. For example... https://www.domain.com/products/product-slim-regular-bikini may also appear as: https://www.domain.com/collections/all/products/product-slim-regular-bikini https://www.domain.com/collections/new-arrivals/products/product-slim-regular-bikini https://www.domain.com/collections/bikinis/products/product-slim-regular-bikini etc, etc It's not uncommon to have up to six duplicates of each product. So my question is twofold: Firstly, should I worry about this from an SEO point of view? I understand the desire to minimise potential duplicate content issues and also in focussing the 'juice' on just one page per product. But I also planned on trying to build the authority of the collection pages. If I request Google not to index the product pages which link off the collections, does this not devalue these collections pages? Secondly, I understand the correct way to fix these is using 'rel canonical' tags, but I'm not clear about HOW to actually do this. Shopify support has not been very helpful. They have provided two different instructions, so just added to the confusion (see below). Shopify instruction #1: Add the following to the theme.liquid file... <title><br />{{ page_title }}{% if current_tags %} – tagged "{{ current_tags | join: ', ' }}"{% endif %}{% if current_page != 1 %} – Page {{ current_page }}{% endif %}{% unless page_title contains shop.name %} – {{ shop.name }}{% endunless %}<br /></title>
Intermediate & Advanced SEO | | muzzmoz
{% if page_description %} {% endif %} Shopify instruction #2: Add the following to each individual product page... So, can anyone help clarify: The best strategic approach to this inherent SEO issue with Shopify (besides moving to another platform!)? and If 'rel canonical' tags is the way to go, exactly where and how to apply them? Regards, Murray1 -
What are the best ways to fix 404 errors?
I recently changed the url of my main blog and now have about 100 404 errors. I did a redirect from the old url to the new one however still have errors. 1. Should I do a 301 redirect from each old blog post url to the new blog post url? 2. Should I just delete the old blog post (url) and rewrite the blog post? I"m not concerned about links to the old posts as a lot of them do not have many links.
Intermediate & Advanced SEO | | webestate0 -
Link + noindex vs canonical--which is better?
In this article http://support.google.com/webmasters/bin/answer.py?hl=en&answer=66359 google mentions if you syndicate content, you should include a link and, ideally noindex, the content, if possible. I'm wondering why google doesn't mention including a canonical instead the link + noindex? Is one better than the other? Any ideas?
Intermediate & Advanced SEO | | nicole.healthline0 -
Is this structure valid for a canonical tag?
Working on a site, and noticed their canonical tags follow the structure: //www.domain.com/article They cited their reason for this as http://www.ietf.org/rfc/rfc3986.txt. Does anyone know if Google will recognize this as a valid canonical? Are there any issues with using this as a the canonical?
Intermediate & Advanced SEO | | nicole.healthline0 -
Canonical, 301 or code a workaround?
Hi, Recently I've been trying to tackle an issue on one of my websites. I have a site with around 400 products and 550 pages total. I've been pruning some weaker pages and pages with shallow content, and it's been working really well. My current issue is this: There are about 20 store brands of 6 products on my site that each have their own page. They are identical products just re-branded. Writing content for each of these pages has been difficult, as it's a fairly dry product too. So I have around 120 pages of dry content that is unique but not much different from one another. I want to consolidate but I am not sure how yet. Here is what I am thinking: 1. 301 - I pick one product page as the master, 301 all the other duplicate products to it and then make one page of great content that encompasses all of them. If the 301 juice gets diluted over time I might miss out on some long tails, but I could also gain a lot more from a great content page with 500+ words of really good content as opposed to pages with 150-250 words of just so so content. 2. Canonical - Similar to above. I pick a master page and canonical the other pages to it. Then I could use the great content on all the pages, and still have pages for the specific products. The pages might not show up in search engines but would still be searchable on my site. 3. Coded solution - In my CMS I could always make a workaround where the products still appear on the brands page (just their name with a link to the product page) but all the links direct to a master page. I realize all the solutions are fairly similar, although I am not sure which is ideal. Option 3 is the most expensive/time consuming but it would drop my page total down to around 450 pages. For a while now (dating back to before Panda) I've been trying to get rid of the low quality and outdated product pages so I could focus on the more popular and active pages. Dropping my page total would also help in the SEO efforts as the sheer volume of pages that need links right now is high, and obviously the less pages I have the more time I can spend on each page (content and link building). So what do you think? Should I do any of the 3, a combination of the 3 or something different? Cheers, Vinnie
Intermediate & Advanced SEO | | vforvinnie0