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
-
Relationship Between Cross-Domain Canonical Versions and Backlinks
Hi All, I am looking for some community insight on how backlinks on the different versions of a canonical page are handled for ranking purposes. Suppose that I have two versions of the same page on two different domains: 1. https://www.mysite.com/tshirts <--Canonical Version 2. https://www.mywebsite.com/tshirts <--Non-Canonical Version that points to page #1 Also consider a third domain that is being linked to from the article. Since it is identical content, both pages contain the same outbound links to this page: 3. https://www.myclothing.com I am wondering how the backlink authority transfer is handled for page number two. Since it has the canonical tag pointing to page 1, only page 1 should be considered for indexing/ranking purposes as a whole page. However, my question relates to what happens to backlink flow since both #1 and #2 above contain links to site #3. In the above example, would both mysite.com and mywebsite.com be passing a backlink to myclothing .com, or would it only be the first domain (www.mysite.com) passing link authority since it is marked as the canonical for ranking purposes. Thanks for any thoughts!
Intermediate & Advanced SEO | | Evan_Wright0 -
Link rel=next and prev validator?
Can I validate link next and prev markup for paginated content?
Intermediate & Advanced SEO | | Evan340 -
Best Strategy for FAQ & Canonical?
I have an FAQ database setup on my site and there's about 30 questions in 6 categories so 5 questions per category which is a pretty good page size for one category. I'm trying to determine the best strategy for publishing them from both a user and SEO standpoint. From a user standpoint, I want to have one page per category. Dumping them into a page with all 30 questions is not user-friendly and some categories are very unrelated to others. I should note that Google did already index a page that does have all the questions on it, but I was just planning on changing that page to just have 6 links to each of the category pages so then I don't have to bother with 301 redirect or removing the pages in the site's Search Console. There's also an option to to link the questions for the entire FAQ or from the category list to one page with just that question and answer. So my thinking at this point is to as I said, just change the page that has all 30 questions to a list of the categories and link to category pages having the questions for that category and disable the individual question pages. Or would it be beneficial from an SEO page to have google index the individual question pages and link back to the category page and put a canonical tag on the category pages? In other words the question then becomes, index the category pages or index the individual question pages? The other issue is the answers for some of the questions are lengthy, multiple paragraphs, and the FAQ has the option to have a hide/unhide feature on the answers so you can easily see all the questions first then expand the answers on the ones you are interested in. However I thought I heard Google discounts (doesn't ignore) content that is by default hidden on page load. I guess this would then give a reason for going with the indexing of the individual question pages. But it seems to me, you can't put the canonical tag on the category pages and point it to the individual question page. And if you put the canonical tag on the individual question page linking it to the category page, then the individual page won't necessarily get indexed will it?
Intermediate & Advanced SEO | | MrSem0 -
Canonical code set up correctly?
Please let me know if this makes sense. I have a very limited knowledge of technical SEO but I am almost positive that my web developer did something wrong. I have a wordpress blog and he did add canonical code to some of the pages. However he directs the site to the same URL! Does this mean that the canonical code is setup incorrectly and actually harming my SEO performance. Also if I have one webpage with just the first paragraph of a blog post I wrote and a completely seperate page for the blog post itself, could this be considered duplicate content? Thanks!!
Intermediate & Advanced SEO | | DR700950 -
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 -
E Commerce product page canonical and indexing + URL parameters
Hi, I'm having some issues on the best way to handle site structure. The technical side of SEO isn't my strong point so I thought I'd ask the question before I make the decision. Two examples for you to look at. This is a new site http://www.tester.co.uk/electrical/multimeters/digital. By selecting another page to see more products you get this url string where/p/2. This page also has the canonical tag relating to this page and not the original page. Now if say for example I exclude this parameter (where) in webmaster tools will I be stopping Google indexing the products on the other pages where/p/2, 3, 4 etc. and the same if I make the canonical point to multimeters/digital/ instead of multimeters/digital/where/p/2 etc.? I have the same question applied to the older site http://www.pat-services.co.uk/digital-multimeters-26.html. which no longer has an canonical tags at all. The only real difference is Google is indexing http://www.pat-services.co.uk/digital-multimeters-26.html?page=2 but not http://www.tester.co.uk/electrical/multimeters/digital/where/p/2 Thanks for help in advance
Intermediate & Advanced SEO | | PASSLtd0 -
Redirecting Canonical 301s and Magento Website
I have an issue with a client's website where it has 3700+ pages, but roughly half of them are duplicates. Thankfully, the only difference between the original and the duplictes is the "?print" at the end of each URL (I suppose this is Magento's way of making a printable page version of the same page. I don't know, I didn't build it.) My questions is, how can I get all the pages like this http://www.mycompany.com/blah.html?print to redirect to pages like this... http://www.mycompany.com/blah.html Also, do they NEED to be Canonical, or will a 301 redirect be sufficient. Also, after having done this, if anybody knows, is there a way I can turn that feature off in Magento, because we're expanding our product line, and I don't want to have to keep chasing after these "?print" pages after the fact.
Intermediate & Advanced SEO | | ClifThompson0