If you are involved in digital marketing or web development you are likely to hear the word ‘redirect’ thrown around frequently, whether it’s regarding a new site launch, a domain migration or a web site cleanup. Redirects have been around for years and there are several types:
- Permanent – “hey server, this page does not live here anymore and has moved over to this address”
- Temporary – “hey server, this page has moved location for a little bit but will return soon, here is his new address for the time being”
- Temporary – “hey server, this page contains secure information and I don’t want to risk you refreshing the content, so please hold the info and head over to this address”
- See Other – “hey server, this page contains some secure information and I don’t want to risk you refreshing the content so please hold the info and head over to this address, but also stay on this page while you do it”
(There are also 308 redirects which are permanent, but are more for the sake of when a form is submitted to a permanently redirected resource – mostly used by developers.)
This post will focus on the two main methods of redirection for single pages, 301s and rel=canonicals – which from an SEO prospective can help you power through duplicate content issues, boost your rankings and improve user experience significantly.
What Are Rel=Canonicals?
“The rel=canonical element, often called the “canonical link”, is an HTML element that helps webmasters prevent duplicate content issues. It does this by specifying the “canonical URL”, the “preferred” version of a web page. Using it well improves a site’s SEO.”
I’ll be the first to admit, the definitions are not great at explaining what this tag actually does – this example from Hallam’s Head of Insights Jonathan on how to use canonicals should help:
There will be situations where you have a number of pages which are vital to the infrastructure of your website but contain either similar or identical content. Rather than risking a penalty for duplicate content, you can add a rel=canonical tag on the page which you feel is the preferred source of information, as shown in the example above.
What Are 301 Redirects?
“A 301 redirect is an essential tool, used to maintain the performance of a website by providing search engines and users with the latest/most relevant version of a web page in the all too common event that the original page has been moved or updated.”
An example would be when you are planning a new website, say your old hats ???? page was www.example.com/hats and on the new site you want to change the URL to www.example.com/accessories/hats without losing your rankings or diluting the link equity that you have worked so hard to build up. Simply apply a 301 redirect on your current page to tell the server that this page has moved, so please take all of my hard work over there.
Previously, the heads at Google stated that 301 redirects will result in a 15% loss in page rank. However, last year Gary Illyes stated the following on Twitter:
30x redirects don’t lose PageRank anymore.
— Gary Illyes ᕕ( ᐛ )ᕗ (@methode) July 26, 2016
30x stand for 300 redirects in general, and in response to Gary’s comment – awesome.
What Is the Difference Between Canonical Tags and 301 Redirects?
In the simplest terms, this is what each one communicates to search engines:
301 Redirect – Hello Search Engine, my page has moved, I just wanted to let you know that is has moved over here and if you can please remove it from your index and pass all of the equity and rankings over to my new page I’ll be very grateful.
Canonical Tag – Hello Search Engine, I wanted to let you know I have multiple versions of this page, don’t worry I am not trying to spam you with duplicate content, so here is the main page which I would like indexing. I would like to keep the other variations for users to see but don’t include them in your index and please pass all of the equity to the main page.
How to use rel=canonicals
First thing’s first, decide which page you want to be your preferred URL. There are a tonne of plug ins available to apply canonical tags if you are using a CMS such as WordPress or Magento, however if you are going straight into the code you will need to add the following <link> to the <head> section of the additional pages, not your preferred page:
<link rel=”canonical” href=”https://www.example.com/hats” />
This will indicate that this is the preferred URL for users who want to access your hats page and will tell search engines that you would like them to show this page over your other similar hats pages. As with anything search engine related, Google specifically stated that “We attempt to respect this (canonical tags), but cannot guarantee this in all cases”.
When to use rel=canonicals
Unlike a redirect, a canonical tag does not tell the server to send a user to another page – this is a signal to search engines to show them the preferred page you would like your user to see. Often there are situations where multiple pages are required despite the content being very similar, the most basic example would be on an ecommerce site:
Page One – example.com/hats/alphabetical
Page Two – example.com/hats/price
Both pages serve the same content, are very useful to the user and have to be on the site to ensure your products can be listed by price and in alphabetical order. If the site owner decides it is better to server users the price page in search engines, a rel=canonical tag will be added to the alphabetical page to say “hey search engine, I want you to know that these pages are extremely similar but the one I would most like to serve users is the price page please”.
How to use 301 redirects
301 redirects require altering the htaccess file, as with canonical tags – the likes of WordPress and Magento already have plug ins which allow you to pop the redirects straight into the CMS and manage them this way. For example:
Outside of these CMS systems, 301 redirects will require amending the htaccess file, whether it is through a developer/webmaster or straight into the file with ftp access. 301 redirects can be broken down into three sections:
- The redirect – ‘Redirect 301 ‘
- The old page – ‘/hats ‘
- The new page – ‘/accessories/hats’
Put them together and you have a redirect ready to stick in the htaccess file: Redirect 301 /hats /accessories/hats.
Be careful when putting redirects together as the slightest mistake with spacing/foreign characters/blanks will cause the site to crash, always work in stages – don’t ever blast out the entire redirect file and stick it up!
When to Use 301 Redirects
301 redirects should be used whenever a page/domain permanently moves to a new destination. Say you head into Google Search Console and find a number of 404 pages – 301s will fix this. Simply find a new location, put the redirect together and upload it to the server.
Best practice is to find a perfect match for the new URL when implementing 301 redirects, this way the user will be served the same/better content and the page will be relevant for search engines to serve. However, working for an ethical digital agency – we see some interesting redirect strategies from time to time, such as:
- New site -> Redirects EVERY page to the homepage. Yep. This effective time saver will ruin your SEO.
- New site -> Not applying ANY 301 redirects. Why not start from scratch? All those years of building links don’t matter right?
301 redirects are purely for when a page/domain has moved to a new location – old -> new, tell the server which one to serve and you are good to go.
Canonicals are for when you have multiple pages with similar content that all serve a purpose, the canonical tag will tell search engines which is your preferred page.
The whole topic of redirection is intimidating, I think the word permanent is what often scares developers and SEOs. Trust me, there is nothing to worry about as long as you plan everything and roll out your changes bit by bit so you can revert back if you cause the site to crash, or you find the canonical is on the wrong page.
For some awesome tips on technical SEO, head over to the Hallam SEO blog!