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
-
No Index No follow instead of Rel canoncical on product pages
Hi all, we handle our product pages no with rel canonical now, we have 1 url that is indexed http://www.prams.net/cam-combi-family the other colours have different urls like http://www.prams.net/cam-combi-family-3-in-1-pram-reversible-seat-car-seat-grey-d which canonicalize to the indexed page. Google still crawls all those pages. For crawl budget reasons we want to use "no index, no follow" instead on these pages (the pages for the other colours)? Google would then crawl fewer pages more often? Does this make sense? Are their any downsides doing it? Thanks in advance Dieter
Intermediate & Advanced SEO | | Storesco1 -
Does a non-canonical URL pass link juice?
Our site received a great link from URL A, which was syndicated to URL B. But URL B is canonicalized to URL A. Does the link on URL B pass juice to my site? (See image below for a visual representation of my question) zgbzqBy
Intermediate & Advanced SEO | | Choice1 -
Rel canonical or redirect
Hi, my client has the following links pointing to the home page http://www.weddingrings.com/index.cfm http://www.weddingrings.com In this case would I use rel canonical or redirect?
Intermediate & Advanced SEO | | alexkatalkin0 -
Investigating Google's treatment of different pages on our site - canonicals, addresses, and more.
Hey all - I hesitate to ask this question, but have spent weeks trying to figure it out to no avail. We are a real estate company and many of our building pages do not show up for a given address. I first thought maybe google did not like us, but we show up well for certain keywords 3rd for Houston office space and dallas office space, etc. We have decent DA and inbound links, but for some reason we do not show up for addresses. An example, 44 Wall St or 44 Wall St office space, we are no where to be found. Our title and description should allow us to easily picked up, but after scrolling through 15 pages (with a ton of non relevant results), we do not show up. This happens quite a bit. I have checked we are being crawled by looking at 44 Wall St TheSquareFoot and checking the cause. We have individual listing pages (with the same titles and descriptions) inside the buildings, but use canonical tags to let google know that these are related and want the building pages to be dominant. I have worked though quite a few tests and can not come up with a reason. If we were just page 7 and never moved it would be one thing, but since we do not show up at all, it almost seems like google is punishing us. My hope is there is one thing that we are doing wrong that is easily fixed. I realize in an ideal world we would have shorter URLs and other nits and nats, but this feels like something that would help us go from page 3 to page 1, not prevent us from ranking at all. Any thoughts or helpful comments would be greatly appreciated. http://www.thesquarefoot.com/buildings/ny/new-york/10005/lower-manhattan/44-wall-st/44-wall-street We do show up one page 1 for this building - http://www.thesquarefoot.com/buildings/ny/new-york/10036/midtown/1501-broadway, but is the exception. I have tried investigating any differences, but am quite baffled.
Intermediate & Advanced SEO | | AtticusBerg10 -
Should we NOINDEX NOFOLLOW canonical pages?
Hi, I was window shopping at Gemvara and noticed something interesting... They rank very high for long-tail phrases such as "rose gold engagement rings" and in their pagination pages for that category not only they filled canonical to the main category page (which is logic) but also they "NOINDEX NOFOLLOW" the pages... Is that recommended? Thanks
Intermediate & Advanced SEO | | BeytzNet0 -
Affiliate & canonicals
Hi, any help with this one would be great.... www.example.com sells widgets online. They are also promoted on a 3rd party website www.partner.com. Currently www.partner.com links to a page on www.example.com that is completely branded with the 'partners' design, style and unique copy (you would think you were still on 'partner' website). I saw this interesting article from 2011: http://www.seomoz.org/blog/getting-seo-value-from-your-affiliate-links (in particular idea 1) Do you think adding a rel=canonical on www.example.com's partner page is still safe? All the best & thank you, Richard
Intermediate & Advanced SEO | | Richard5550 -
Canonical Issue need hep
Hi Is my site has any issue with duplicate pages within the site , have i define my canonical tag properly , can any one advise please help. childrensfunkyfurniture.com
Intermediate & Advanced SEO | | conversiontactics0 -
How does one know where to insert the right strips of coding on the right pages for Canonical Links?
On my Website, I am the only SEO optimizer wizard person. I have to teach myself everything and I get overwhelmed a lot. I recently started using SEOMOZ and on my report it stated we had duplicate page titles and that it was bad and should be fixed quickly. So I did my research and found that I needed to use canonical links to reference one page to be indexed. However my problem lies in exactly how to add this coding to my site. I greatly appreciate any help or at least looking at this question.
Intermediate & Advanced SEO | | FrontlineMobility0