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 and Alternate Advice
At the moment for most of our sites, we have both a desktop and mobile version of our sites. They both show the same content and use the same URL structure as each other. The server determines whether if you're visiting from either device and displays the relevant version of the site. We are in a predicament of how to properly use the canonical and alternate rel tags. Currently we have a canonical on mobile and alternate on desktop, both of which have the same URL because both mobile and desktop use the same as explained in the first paragraph. Would the way of us doing it at the moment be correct?
Intermediate & Advanced SEO | | JH_OffLimits3 -
Landing pages for paid traffic and the use of noindex vs canonical
A client of mine has a lot of differentiated landing pages with only a few changes on each, but with the same intent and goal as the generic version. The generic version of the landing page is included in navigation, sitemap and is indexed on Google. The purpose of the differentiated landing pages is to include the city and some minor changes in the text/imagery to best fit the Adwords text. Other than that, the intent and purpose of the pages are the same as the main / generic page. They are not to be indexed, nor am I trying to have hidden pages linking to the generic and indexed one (I'm not going the blackhat way). So – I want to avoid that the duplicate landing pages are being indexed (obviously), but I'm not sure if I should use noindex (nofollow as well?) or rel=canonical, since these landing pages are localized campaign versions of the generic page with more or less only paid traffic to them. I don't want to be accidentally penalized, but I still need the generic / main page to rank as high as possible... What would be your recommendation on this issue?
Intermediate & Advanced SEO | | ostesmorbrod0 -
301s Or Stick With Canonical?
Hello all! A nice interesting one for you on this fine Friday... I have some pages which are accessible by 2 different urls - This is for user experience allowing the user to get to these pages in two different ways. To keep Google happy we have a rel canonical so that Google only sees one of these urls to avoid duplicates. After some SEO work I need to change both of these urls (on around 1,000 pages). Is the best way to do this... To 301 every old url to every new url Or... To not worry as I will just point the indexed pages to the new rel canonical? Any ideas or suggestions would be brilliant. Thanks!
Intermediate & Advanced SEO | | HB170 -
Using Canonical on home page
Our home page has the canonical tag pointing to itself (something from wordpress i understand). Is there any positive or negative affect that anyone is aware of from having pages canonical'ed to themselves?
Intermediate & Advanced SEO | | halloranc0 -
Rel=Canonical=CONFUSED
Hey, I am a confused canonical and here's why - please help! I have a master website called www.1099pro.com and then many other websites that simply duplicate the material on the master site (i.e www.1099A.com, www.1099T.com, www.1099solution.com, and the list goes on). These other domains & pages have been around for long enough that they have been able to garner some page authority & domain authority that it makes it worthwhile to redirect them to their corresponding pages on www.1099pro.com. The problem is two-fold when trying to pass this link-juice: I do not have access to the web-service that hosts the other sites/domains and cannot 301 redirect them The other sites/domains are setup so that whatever changes I make to www.1099pro.com are automatically distributed across all the other sites. This means that when I put on www.1099pro.com it also shows up on all the other domains. It is my understanding that having on a site such as www.1099solution.com does not pass any link juice and actually eliminates that page from the search results. Is there any way that I can pass the link juice?
Intermediate & Advanced SEO | | Stew2220 -
Do different meta titles & descriptions delete the canonical origin?
Hi, hopefully anyone knows something about this case: There is a canonical tag on site "www.xyz.com**/de_de/" **refering to site "www.xyz.com/de-de/". If the meta title and descriptions are different on both sides - is there a problem that google will not pay attention to the canonical tag? Do both sides need the same title and canonical? Thanx for your answers! Cheers Heiko!
Intermediate & Advanced SEO | | heckert0 -
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 -
Rel=alternate to help localize sites
I am wondering about the efficiency of the rel=alternate tag and how well it works at specifically localizing content. Example: I have a website on a few ccTLD's but for some reason my .com shows up on Google.co.uk before my .co.uk version of my page. Some people have mentioned using rel=alternate but in my research this only seems to be applicable for duplicate content in another language. If I am wrong here can somebody please help me better understand this application of the rel=alternate tag. All my research leads me to rel=alternate hreflang= and I am not sure that is what I want. Thanks,
Intermediate & Advanced SEO | | DRSearchEngOpt
Chris Birkholm0