scm22ri — 2013-03-25T11:03:04-04:00 — #1
I was wondering if I'm writing my canonical URL links correctly?
My canonical URL link
<a link rel="canonical" href ='/dealers/Alabama'>Alabama</a>
Below is the way google displays it on their website.
<link rel="canonical" href="http://www.example.com/product.php?item=swedish-fish"/>
Notice mine above has the a at the beginning and end. Does this make much of a difference? Will google not know it's my canonical URL because of the added a at the beginning and end of the URL link?
davemaxwell — 2013-03-25T13:28:06-04:00 — #2
Yes, it makes a difference. You want to use the <link format as that is the valid header format. <a is a completely different element, and should be used inside the body of a page to link from one page to another. The link you're looking for is used in the header to tell google, hey, this page needs to be accounted for as well.
smanaher — 2013-03-28T22:30:18-04:00 — #3
Your syntax is all wrong. Per Dave, you should be using <link> and not an <a> tag.
Also, you have anchor text in your link. This link isn’t the same as a hyperlink that is embedded in the copy of a website. It will not be visible to users but is supposed to instruct search engines on which page is the correct one to index. Also, you need to have the absolute path of the page and not just the URI.
Here is what it should look like,
<link rel=”canonical” href=http://www.example.com />
scm22ri — 2013-03-31T13:42:51-04:00 — #4
Thanks guys for your help!
system — 2014-10-07T23:59:36-04:00 — #5
This topic is now closed. New replies are no longer allowed.