Canonical URLs: improving your website’s performance in search engines

A rather more technical post than usual, but if you are used to playing around with HTML tags or fiddling with the innards of systems such as WordPress, this post has some good news that could make your website perform better in search engines…

The multiple URLs problem

It is quite common for a page on a website to be accessible via more than one web address. For example:

http://www.libdems.org.uk/news/new-government-bailout-is-blank-cheque-131421437;show

and

http://www.libdems.org.uk/news/new-government-bailout-is-blank-cheque-131421437 (i.e. without ;show at the end)

both link to the same page.

There are two reasons this might be a problem. First, a search engine may fail to realise that these are the same page and so search results get clogged up with duplicates. Second, some people may link to one version of the URL and other people to the other. Splitting links between these two versions can mean the page performs less well in search engines than if all the links were to just the one.

Search engines are pretty good at trying to deal with this sort of problem, but they aren’t perfect.

The new canonical command

Google, Microsoft and Yahoo have however just teamed up to agree a way of making it easy for people running websites to let search engines know which is the preferred URL for a page so that, even if the search engine follows an alternative version, when it gets to the page it realises what it should be called.

You do this by putting a <link> tag in the <head> section of each page, e.g.

<link rel=”canonical” href=”http://www.williamgladstone.com/shortspeeches” />

This tells search engines that even if they access the page via http://www.williamgladstone.com/shortspeeches
http://www.williamgladstone.com/shortspeeches?sessionid=3sdr5 and
http://www.williamgladstone.com/shortspeeches;show

that all three are the same page and the first URL is the one to be used.

For more information, see Microsoft’s page about the canonical link tag. (Google and Yahoo have pages too, but I think Microsoft’s is better at describing the issue for a relatively non-technical reader and does this without sacrificing necessary technical detail.)

For WordPress users, there is at least one plugin already which helps you make these settings: http://yoast.com/wordpress/canonical/. (Health warning: it’s from a well-regarded source, but I’ve not used it myself yet.)

Read more by or more about , , , or .
This entry was posted in Online politics.
Advert

8 Comments

  • On the subject of improving websites, is there any way of solving the problem of getting out-of-date versions of pages on https://www.libdemvoice.org? I have seen other people mention it, so it’s not just me. Clicking “Refresh” doesn’t seem to cure it, though adding a random query string to the URL does.

  • “If you are seeing an old page, try doing a forced refresh (Ctrl+F5) which should request to all three that you want the latest version of a page.”

    Thanks – I’ll try that.

  • Ryan

    I’m afraid Ctrl/F5 doesn’t solve the problem.

Post a Comment

Lib Dem Voice welcomes comments from everyone but we ask you to be polite, to be on topic and to be who you say you are. You can read our comments policy in full here. Please respect it and all readers of the site.

If you are a member of the party, you can have the Lib Dem Logo appear next to your comments to show this. You must be registered for our forum and can then login on this public site with the same username and password.

To have your photo next to your comment please signup your email address with Gravatar.

Your email is never published. Required fields are marked *

*
*
Please complete the name of this site, Liberal Democrat ...?

Advert



Recent Comments

  • User AvatarJoseph Bourke 24th Jan - 1:36am
    As the prospect of a Brexit election subsides in the face of projections of another hung parliament and the Labour leadership procrastinate on getting behind...
  • User AvatarChristopher Haigh 24th Jan - 12:03am
    There basically three types of breciteers within the Tory party - one of them divided into two sub groups. There are the Little Englanders (...
  • User AvatarRoland 23rd Jan - 11:33pm
    @Peter Martin - re: Matthew Green His point is interesting, however, if the UK does crash out, don't expect the EU to leave the pre-Brexit...
  • User AvatarSimon Banks 23rd Jan - 11:23pm
    A prominent Liberal Democrat activist who is a lawyer did speak to Simon Hughes about his deep concerns (read anger) about what had been done...
  • User AvatarMartin 23rd Jan - 11:17pm
    Michael: If you watched these things closely, you would know that the 2015 election was rerun only couple of years later, so rerunning a 2016...
  • User AvatarMichael 23rd Jan - 10:47pm
    We already had a "people's vote", and the people voted to leave. You might not like it, but we can't keep rerunning every vote just...