Rel Canonical Syntax
-
My IT department is getting ready to setup the rel canonical tag, finally. I took a look at the code on our test server and see that they are using a single quote in the tag syntax (see code block below). Should I be concerned? Will Google read those lines the same?
<link rel='canonical' href='[http://www.wholesalecostumeclub.com/easter-costumes/bunny-suits](view-source:http://www.wholesalecostumeclub.com/easter-costumes/bunny-suits)' />VS. **versus** <link rel="canonical" href="[http://www.wholesalecostumeclub.com/easter-costumes/bunny-suits](view-source:http://www.wholesalecostumeclub.com/easter-costumes/bunny-suits)" />
-
To quote W3C draft specification on HTML5
Attributes are placed inside the start tag, and consist of a name and a value, separated by an "
=
" character. The attribute value can remain unquoted if it doesn't contain spaces or any of"
'
```=
<
or>
. Otherwise, it has to be quoted using either single or double quotes. The value, along with the "=
" character, can be omitted altogether if the value is the empty string.The accepted convention is " but according to the standard both are supported.
P.S. Is a version of your site live, if so I would maybe like to blog about it as it is related to what we are doing in baby toddler items (looking at your avatar).
-
<link rel="canonical" href="<a class="external" rel="nofollow" target="_blank">http://www.sitename.com/</a>" /> would be correct. Don't forget the double quotes!
-
Double quote is the norm in HTML
-
I have used it like this and haven't had any issues<link rel="canonical" href=http://www.sitename.com />If you use wordpress - yoast seo plugin - does it the same way.Read this post it will clear your question
http://www.seomoz.org/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps -
I agree with John... why chance it? It should be a piece of cake for them to set it up with conformity to the standard
-
I'm not positive about how they'll deal with it, but why take a chance? It won't be that hard for them to change it from a single to a normal quotation, especially since it's on your test server.
Better safe than sorry.
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 questions
Hi, We are working on a site that sells lots of variations of a certain type of product. (Car accessories) So lets say there are 5 products but each product will need a page for each car model so we will potentially have a lot of variations/pages. As there are a lot of car models, these pages will have pretty much the same content, apart from the heading and model details. So the structure will be something like this; Product 1 (landing page) Audi (model selection page)
Intermediate & Advanced SEO | | davidmaxwell
---Audi A1 (Model detail page)
---Audi A2 (Model detail page)
---Audi A3 (Model detail page) BMW (model selection page)
---BMW 1 Series (Model detail page)
---BMW 3 Series (Model detail page) Product 2 (landing page) Audi (model selection page)
---Audi A1 (Model detail page)
---Audi A2 (Model detail page)
---Audi A3 (Model detail page) BMW (model selection page)
etc
etc The structure is like this as we will be targeting each landing page for AdWords campaigns. As all of these pages could look very similar to search engines, will simply setting up each with a canonical be enough? Is there anything else we should do to ensure Google doesn't penalise for duplicate page content? Any thoughts or suggestions most welcome.
Thanks!0 -
E commerce canonical links: include category structure?
I have a client on shopify. All categories have correct canonical links. however, the links from all menus, category pages, etc. follow this structure: /collections/COLLECTION_NAME/products/PRODUCT_NAME but the canonical link on the above product url is: /products/PRODUCT_NAME I have a feeling this is hurting our product detail page's seo. Our collection pages are ranking fine, but for some reason the detail pages aren't. It could be that they are deeper, but I am trying to make sure nothing big is causing it first before I get into the smaller factors. Any best practices on this?
Intermediate & Advanced SEO | | no6thgear0 -
Using unique content from "rel=canonical"ized page
Hey everyone, I have a question about the following scenario: Page 1: Text A, Text B, Text C Page 2 (rel=canonical to Page 1): Text A, Text B, Text C, Text D Much of the content on page 2 is "rel=canonical"ized to page 1 to signalize duplicate content. However, Page 2 also contains some unique text not found in Page 1. How safe is it to use the unique content from Page 2 on a new page (Page 3) if the intention is to rank Page 3? Does that make any sense? 🙂
Intermediate & Advanced SEO | | ipancake0 -
Scanning For Duplicate Canonical Tags
I'm looking for a solution for identifying pages on a site that have either empty/undefined canonical tags, or duplicate canonical tags (meaning the tag occurs twice within the same page). I've used Screaming Frog to view sitewide canonical values, but the tool cannot identify when pages use the tag twice, nor can it differentiate between pages that have an empty canonical tag and pages that have no canonical tag at all. Any help finding a tool of some sort that can assist me in doing this would be much appreciated, as I'm working with tens of thousands of pages and can't do this manually.
Intermediate & Advanced SEO | | edmundsseo0 -
How Long Does it Take for Rel Canonical to De-Index / Re-Index a Page?
Hi Mozzers, We have 2 e-commerce websites, Website A and Website B, sharing thousands of pages with duplicate product descriptions. Currently only the product pages on Website B are indexing, and we want Website A indexed instead. We added the rel canonical tag on each of Website B's product pages with a link towards the matching product on Page A. How long until Website B gets de-indexed and Website A gets indexed instead? Did we add the rel canonical tag correctly? Thanks!
Intermediate & Advanced SEO | | Travis-W0 -
Use of rel="alternate" hreflang="x"
Google states that use of rel="alternate" hreflang="x" is recommended when: You translate only the template of your page, such as the navigation and footer, and keep the main content in a single language. This is common on pages that feature user-generated content, like a forum post. Your pages have broadly similar content within a single language, but the content has small regional variations. For example, you might have English-language content targeted at readers in the US, GB, and Ireland. Your site content is fully translated. For example, you have both German and English versions of each page. Does this mean that if I write new content in different language for a website hosted on my sub-domain, I should not use this tag? Regards, Shailendra Sial
Intermediate & Advanced SEO | | IM_Learner0 -
No index, follow vs. canonical url
We have a site that consists almost entirely as a directory of videos. Example here: http://realtree.tv/channels/realtreeoutdoorsclassics We're trying to figure out the best way to handle pagination and utility features such as sort for most recent, most viewed, etc. We've been reading countless articles on this topic, but so far have been unable to determine what might be considered the industry standard. Two solutions seem to stand out... Using the canonical url on all the sorted and paginated pages. However, after reading many blog posts, it seems that you should NEVER use the canonical url to solve the issue of paginated, and thus duplicated content because the search bots will never crawl past the first page leaving many results not in the index. (We are considering ruling this method out.) Another solution seems to be using the meta tag for noindex, follow so that a search engine like Google will crawl your directory pages but not add them to the index themselves. All links are followed so content is crawled and any passing link juice remains unchanged. However, I did see a few articles skeptical of this solution as well saying that there are always better alternatives, or that there is no verification that search engines obey this meta tag. This has placed some doubt in our minds. I was hoping to get some expert advice on these methods as it would pertain to our site. Thank you.
Intermediate & Advanced SEO | | grayloon0 -
How permanent is a rel="canonical"?
We are rolling out our canonicals now, and we were wondering: what happens if we decide we did this wrong and need to change where canonicals point? In other words, how bad of a thing is it to have a canonical tag point to page a for a while, then change it to point to page b? I'm just curious to see how permanent of a decision we are making, and how bad it will be if we screwed up and need to change later. Thanks!
Intermediate & Advanced SEO | | CoreyTisdale0