Rel=canonical
-
My website is built around a template, the hosting site say I can only add code into the body of the webpage not the header, will this be ok for rel=canonical
If it is my next question is redundant but as there is only one place to put it which urls do I need to place in the code
http://domain.com, www.domain.com or http://www.domain.com
the /default.asp option for my website does not seem to exist, so I guess is not relevant
thanks
-
http://www.domain.com is the same as www.domain.com. http is the protocol in which web pages are formatted and sent and would be part of any "complete" URL.
So to answer your question, if there are no redirects in place you can choose either the non www or www version for your canonical tags. However if you are looking to consolidate to a particular version I would look at updating your htaccess file to create a redirect rule from one version to the other.
#Force non-www to www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]or
#Force www to non-www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] -
Ok that means I can not use it on my main website but I have another hosted elsewhere where I can. So If I add the code in the head section of my web editor which links do I need to include
http://www.domain.com http://domain.com or www.domain.com and what is the correct syntax
I am assuming that my web editor changes 1 of those, but the change shows up on all three, so which is the authoritative page and which pages need to be referenced in the tag
I read the google article but I think I am more confused than ever
Thank you
-
rel=canonical needs to either go within the tags or the HTTP header.
http://googlewebmastercentral.blogspot.co.uk/2013/04/5-common-mistakes-with-relcanonical.html
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
-
Homepage has canonical tag pointing to innerpage
Hi, I'm stuck! This e-commerce site which I'm currently working on has an unusual problem. So the homepage has a canonical tag pointing to one of its category pages. Is this okay SEO-wise? Based on what I understand, the homepage is the most important page in a site. And if there is a mirror duplication, it would be better to canonicalise the inner page to the homepage rather than in reverse. Looking forward to getting some answers. Cheers!
Intermediate & Advanced SEO | | nerdieb0 -
Why isn't the rel=canonical tag working?
My client and I have a problem: An ecommerce store with around 20 000 products has nearly 1 000 000 pages indexed (according to Search Console). I frequently get notified by messages saying “High number of URLs found” in search console. It lists a lot of sample urls with filter and parameters that are indexed by google, for example: https://www.gsport.no/barn-junior/tilbehor/hansker-votter/junior?stoerrelse-324=10-11-aar+10-aar+6-aar+12-aar+4-5-aar+8-9-aar&egenskaper-368=vindtett+vanntett&type-365=hansker&bruksomraade-367=fritid+alpint&dir=asc&order=name If you check the source code, there’s a canonical tag telling the crawler to ignore (..or technically commanding it to regard this exact page as another version of the page without all the parameters) everything after the “?” Does this url showing up in the Search Console message mean that this canonical isn’t working properly? If so: what’s wrong with it? Regards,
Intermediate & Advanced SEO | | Inevo
Sigurd0 -
Strange Cross Domain Canonical Issue...
We have 2 identical ecommerce sites. Using 301 is not an option since both are major brands. We've been testing cross domain canonicals for about 2 dozen products, which were pretty successful. Our rankings generally increased. Then things got weird. For the most part, canonicaled pages appeared to have passed link juice since the rankings significantly improved on the other site. The clean URLs (www.domain.com/product-name/sku.cfm) disappeared from the rankings, as they are supposed to, but some were replaced by urls with parameters that Google had indexed (apparently duplicate content). ex: (www.domain.com/product-name/sku.cfm?clicksource?3diaftv). The parametered URLs have the correct canonical tags. In order to try and remove these from Google's index, we: 1. Had the pages fetched in GWT assuming that Google hadn't detected the canonical tage. 2. After we discovered a few hundred of these pages indexed on both sites, we built sitemaps of the offending pages and had the sitemaps fetched. If anyone has any other ideas, please share.
Intermediate & Advanced SEO | | AMHC0 -
Best time to choose a canonical URL & 301 redirect
I have taken on the task of getting a fairly huge eCommerce site more SEO friendly & have just realized that no URL has been chosen as our preferred domain. Should we designate a preferred domain now or wait until after the first of the year since we are hitting our busy period right now?
Intermediate & Advanced SEO | | Winoman0 -
Rel=Canonical - needed if part duplication?
Hi Im looking at a site with multiple products available in multiple languages. Some of the languages are not complete, so where the product description is not available in that language the new page, with its own url in the other languages may take the English version. However, this description is perhaps 200 words long only, and after the description are a host of other products displays within that category. So say for example we were selling glasses, there is a 200 word description about glasses (this is the part that is being copied across the languages) and then 10 products underneath that are translated. So the pages are somewhat different but this 200 word description is copied thru different versions of our site. Currently, the english version is not rel=canonical, would it be better to add the english version where we lack a description and do the canonical option or in fact better to leave it blank until we have a translated description? As its only part of the onpage wording, would this 200 word subsection cause us duplication issues?
Intermediate & Advanced SEO | | xoffie0 -
How to fix a canonical problem with no htaccess?
Basically I need to find a way to fix my canonical problem. The www and no-www version of my site each show up. This creates duplicate content. I have no htaccess with yahoo. How else can I fix this problem? Does anyone have a sample code I could use?
Intermediate & Advanced SEO | | bronxpad0 -
Canonical URL's - Do they need to be on the "pointed at" page?
My understanding is that they are only required on the "pointing pages" however I've recently heard otherwise.
Intermediate & Advanced SEO | | DPSSeomonkey0 -
How to Specify Canonical Link Element for Better Performing?
I read Google webmaster centeral's blog post and help article about rel="canonical" which was compiled by Matt. http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html http://www.google.com/support/webmasters/bin/answer.py?answer=139394 I am working on eCommerce website and found too many duplicate pages with same product as follow. 1. www.lampslightingandmore.com/50_62_10133/java-bronze-floor-lamp-with-walnut-shade.html
Intermediate & Advanced SEO | | CommercePundit
2. www.lampslightingandmore.com/48_10133/java-bronze-floor-lamp-with-walnut-shade.html
3. www.lampslightingandmore.com/48_55_10133/java-bronze-floor-lamp-with-walnut-shade.html
4. www.lampslightingandmore.com/48_57_10133/java-bronze-floor-lamp-with-walnut-shade.html
5. www.lampslightingandmore.com/50_10133/java-bronze-floor-lamp-with-walnut-shade.html
6. www.lampslightingandmore.com/50_56_10133/java-bronze-floor-lamp-with-walnut-shade.html
7. www.lampslightingandmore.com/50_63_10133/java-bronze-floor-lamp-with-walnut-shade.html
8. www.lampslightingandmore.com/63_10133/java-bronze-floor-lamp-with-walnut-shade.html
9. www.lampslightingandmore.com/68_10133/java-bronze-floor-lamp-with-walnut-shade.html
10. www.lampslightingandmore.com/68_58_10133/java-bronze-floor-lamp-with-walnut-shade.html
11. www.lampslightingandmore.com/68_59_10133/java-bronze-floor-lamp-with-walnut-shade.html I have consider 1st product as a primary product and set following rel canonical tag on remaining products. Primary product also contain following rel canonical tag. This was my experience to set canonical tag. But, I am not able to see any improvement on crawling. I was in that assumption due to duplication Google did not crawled my pages. But, Now what is problem with it? How can I fix it and specify proper canonical link element for better crawling? Note: I am working to compile unique content on each product pages and make it live very soon.0