What are ‘canonical’ tags and should I have them?

File this one under ‘help the search engines and they’ll help you’. There’s a tag available to go in the HTML code behind all your website pages which tells the search engines what the URL (page address) of that page is. It’s necessary because – surprising as it may seem – there are many possible URLs for every page on your website, and you don’t want search engines to get confused, or treat them as separate ones. This is called the ‘canonical’ tag, and it’s something you really should have on every page.

Why are there different possible URLs? It could be a problem with the way your content management system has been set up. It could genuinely be a copy of a page, perhaps created for test purposes. Your URLs might be made up on the fly to represent the path taken to the page (quite common in online stores). Or the search engine could be following a link which has had tracking parameters tacked on the end. In any case, you want to set the search engine straight on the real, unique URL, and the canonical tag is how you do it.

Many website content management systems will do this for you, so the first thing is to see if your site already has it. Choose a random page and take a look at the source code. You’re looking for a line near the top which starts:

<link rel=”canonical” href=”…

If your site has these (and ensure the http/https and www/non-www settings are correct), then you’re done. Have a great weekend. If you can’t find them, it’s something to look into. Here’s a more in-depth guide.