The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

A question about the link tag

I learned this new trick from a Google blog, and it's designed to help people like me, that have duplicate content on my site due to referral URLs. Here is my question...it is ok for me to have two <link> tags in my <header> ?

The link may only appear in the head, but there’s no limit to the number of individual link elements that you can include (a quick look at the source code of any blog powered by WordPress reveals a whole raft of auto-generated link elements relating to archives).

Actually, Google's "canonical" link tag is a waste of space and time. All that happens is the work THEY are supposed to be doing gets offloaded to the site owner. Create a good Web site with unique content on each page, without it being duplicated and you're good to go. (And if you're using a CMS like WordPress, learn how to block those duplicate pages before launching the site.)

A better alternative than that is to just have all of those addresses automatically redirect to just the one address so that not only the search engines but everyone sees the one address regardless of what was typed in.

A better alternative than that is to just have all of those addresses automatically redirect to just the one address so that not only the search engines but everyone sees the one address regardless of what was typed in.

that "canonical" thing is for people who have web sites like for example a shopping cart, where different URLs can go to the same product (the same content). Search engines are always looking our for "duplicate content" where people deliberately copy and redistribute content (across their own site or multiple sites) for higher search rankings. But if you have the shopping-cart problem like I just said, then you're not doing that for rankings, but because that's how your site works.

And this should be ok. Google made the canonical thing up, so the best it can do is maybe help Google out-- other search engines don't have to follow it, and could penalise your site for "having duplicate content". This is because search bots see every URL as unique, a whole new page, even if it's really just the same single page with a bunch of URLs.

So the better thing to do, as Stephen and Dan said, is to configure your server (don't ask me how) to make visitors only be able to get to that product or page via ONE URL and no others. *edit, oh, just redirects. So these changes are set in your HTTP headers on the server with I'm guessing the 303 or 302 (I can't keep those two apart, one is more appropriate than the other).

Some people don't have that sort of access to their hosting server, which I'm thinking is why the canonical link is popular.