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
-
Where to point canonical for m-dot site in the wake of Mobile-First Indexing
My client currently use an m-dot URL for their mobile site and while conducting a technical audit for their web properties, we have noticed that their desktop is using a self-referencing rel="canonical" while their mobile m-dot has no rel="canonical" tags. While our initial recommendation is to point the mobile m-dot point to the desktop using a rel="canonical" and the desktop point to the mobile using a rel="alternative," there have been hesitations about mobile first indexing and canonical tags. If Google will use the m-dot for indexing purposes moving forward, is the progressive recommendation to have the desktop point to the m-dot using a rel="canonical" and the m-dot point to the desktop using a rel="alternative" or to maintain the initially stated recommendation?
Intermediate & Advanced SEO | | Derek_Hawk0 -
Is Canonical Tags a Good Option With 2 Similar Sites?
I have an existing ecommerce site, on a Yahoo platform. I have recently started a different site on the Magento platform with substantially/almost entirely the same products and categories. For various reasons, I won't be ready to do a 301 redirect to the new domain for about another 8 months. I have 4 questions: Is it a good idea to use canonical tags in the meantime? Is there a way to know if the is cannibalization between the sites? They rank for different keywords. Will I lose all traffic and rankings for the Yahoo site if I go the canonical route? If I remove the canonical tags at a later point, will the ranking and traffic of the Yahoo site come back? Thanks in advance for your advice.
Intermediate & Advanced SEO | | Kevin_Hatanian0 -
Duplicate pages and Canonicals
Hi all, Our website has more than 30 pages which are duplicates. So canonicals have been deployed to show up only 10 of these pages. Do more of these pages impact rankings? Thanks
Intermediate & Advanced SEO | | vtmoz0 -
Using del canonical for subpage relating to homepage
Hi, I have a subpage that has a Moz-Page Optimization score for a keyword of 98%. Nevertheless that page is not seen on page one of google. Instead google shows the homepage of the same site which has only an optimization score of around 50%. Now Moz suggests to implement a del canonical tag. Should I implement one in the subpage relating to the homepage? I have never done this and am a little unsure. What if there are other keywords for which the homepage should be shown? Will the homepage still show up? Best wishes Marc
Intermediate & Advanced SEO | | RWW0 -
Rel=Canonical to Longer Page?
We've got a series of articles on the same topic and we consolidated the content and pasted it altogether on a single page. We linked from each individual article to the consolidated page. We put a noindex on the consolidated page. The problem: Inbound links to individual articles in the series will only count toward the authority of those individual pages, and inbound links to the full article will be worthless. I am considering removing the noindex from the consolidated article and putting rel=canonicals on each individual post pointing to the consolidated article. That should consolidate the PageRank. But I am concerned about pointing****a rel=canonical to an article that is not an exact duplicate (although it does contain the full text of the original--it's just that it contains quite a bit of additional text). An alternative would be not to use rel=canonicals, nor to place a noindex on the consolidated article. But then my concern would be duplicate content and unconsolidated PageRank. Any thoughts?
Intermediate & Advanced SEO | | TheEspresseo0 -
Rel=author, google plus, picture in Article page SERP
Hello, Could someone explain the easiest way to use Google Plus and rel="author" to claim our articles written by us and get our picture beside them in the Google SERPS site: nlpca(dot)com
Intermediate & Advanced SEO | | BobGW0 -
Canonical Tag Uses Source Title and Meta Data?
When optimising a regional same language micro site within a sub folder of a .com it dawned on me that our use of the hreflang and canonical meta elements will render individual elements such as H1 and title obsolete. As a canonical tag takes the canonical source title and meta right? It would still have value in optimising localised headings though? Appreciate any thoughts, suggestions (o:
Intermediate & Advanced SEO | | 3wh0 -
Canonical Tag and Affiliate Links
Hi! I am not very familiar with the canonical tag. The thing is that we are getting traffic and links from affiliates. The affiliates links add something like this to the code of our URL: www.mydomain.com/category/product-page?afl=XXXXXX At this moment we have almost 2,000 pages indexed with that code at the end of the URL. So they are all duplicated. My other concern is that I don't know if those affilate links are giving us some link juice or not. I mean, if an original product page has 30 links and the affiliates copies have 15 more... are all those links being counted together by Google? Or are we losing all the juice from the affiliates? Can I fix all this with the canonical tag? Thanks!
Intermediate & Advanced SEO | | jorgediaz0