Search the blog

If you have a database and admin system behind your website it can get pretty big, pretty quickly. While it’s great to have a site with lots of content, one potential problem that can arise is when you have one or more pages that point to content that is identical—or almost identical—to another page. While this is not a problem to the end user you can end up doing yourself a disservice when it comes to your position on the search engines.

As an aside, there is some debate as to how much of an issue duplicate content is. For the purposes of this blog let’s assume that search engine ranking aside, it’s nice to have some control over how our URL listings appear in Google.

First off, some definitions…

What is a 301 redirect?

A 301 redirect moves the user from one URL to another. 301 is just a code that tells the search engine that this redirect is permanent so index the new page instead of the old one. The redirect happens in a split second and is usually not noticeable to the end user.

What is a canonical tag?

A canonical tag is a line of text hidden in the web page’s source code that says what the preferred URL for a web page is.

To show how the methods differ in the context of duplicate content consider this example:

www.site.com/productwww.site.com/product.php and www.site.com/product/ all link the the exact same page. The search engines regard these as three separate URLs even though the content is identical. Let’s say our preferred URL is www.site.com/product/.

If we set up a 301 redirect and visit either of the other URLs, the server instantly redirects to the preferred URL and sends a 301 code (though the user is unaware of that).

If we set up a canonical tag all three URLs can be visited without any redirection taking place. If the search engines visit either of our non-preferred one it is still being told in the background what our preferred one is.

So, which is better?

As with most things, it’s about the right tool for the tight job. I see advantages and disadvantages to both methods.

Advantages of a 301 redirect

  1. They can be set up at the script level or server level
  2. They can be set up without editing the source code of the website so are useful for legacy sites or sites where you’re uncomfortable editing the source code (e.g.off-the-shelf CMS)
  3. You can write “rules” that apply to thousands of pages in one go

Disadvantages of a 301 redirect

  1. They can use up more server resources
  2. To use them to their full potential they require knowledge of regular expressions

Advantages of canonical tags

  1. They are easy to set up
  2. They place no extra load on the server

Disadvantages of canonical tags

  1. Must be set for each individual page
  2. Must be done at the script/web page level

My advice is:

  1. Set up canonical tags for sites built from scratch, saving server resources is a good thing, even if you’re only lightening the load a little
  2. Use 301 redirects for any legacy sites or sites where you can’t, or don’t want to, edit the source code

And finally don’t be afraid to block the search engines from certain areas of the sites. Some web pages are for human eyes only!

As a final note, I have compared these methods for duplicate content only. 301 redirects have other uses outside of the prevention of duplicate content.

To get a website call me now on 07843 483 078 or get a free quote online.

Tim Bennett is a freelance web designer from Leeds. He has a First Class Honours degree in Computing from Leeds Metropolitan University and currently runs his own one-man web design company, Texelate.