Redirects affect how users and Google see mobile pages. They’re very costly on mobile networks and are bad for performance speed. Each redirect you remove will therefore dramatically improve how fast content is seen by users. There are four common redirects, these are:

  • Initial redirect – canonical (www.example.com vs example.com)
  • SSL – secure pages redirect
  • Redirect to mobile version
  • Content driven redirects

Contents

 

What is a redirect?

A redirect is the forwarding of a user from one web address to another web address.

No redirect – When a mobile device requests a document at a particular address, the server will usually provide that document.

Redirect – When there is a redirect the web server provides a new address for the document instead of the original document. The mobile device then receives the address and makes another request for the document to the new address. It is only after this stage that it receives the document.

This process is especially slow on mobile networks as any time communication happens between the device and the web server, several things have to happen to enable that communication.

Because redirects are so slow on mobile devices, they should be removed where possible. If you absolutely need a redirect in place, you should try and reduce the number of redirects as much as possible.

Common redirects

In order to reduce or remove redirects, you first need to know why they’re occurring. Let’s go through different types of redirects in turn.

Initial/canonical redirect

Though they will usually have the same content, the URL ‘www.example.com’ and ‘example.com’ are two separate URLs, with one having ‘www’ and one being without. Site owners choose one version of the URLs to use through their site.

To ensure pages always use the same version of the URL, a site wide redirect is generally used. This is why you end up at ‘www.google.com’ when you type ‘google.com’ into your browser.

SSL – secure pages redirect

Pages that use SSL are redirected from the URL “http://www.example.com” to the secure version of that page at “https://www.example.com“.

This redirect happens when a site owner uses a site wide 301 redirect as a way of forwarding all pages to secure versions of the pages.

Redirect to mobile version of the page

When you have different URLs for your mobile pages than you do for desktop pages, the mobile device must be able to access the mobile version, and the way to do so is with a redirect. This redirect only happens when there are separate URLs for mobile and desktop content and does not happen if you use responsive web design or dynamic solutions.

Content driven redirects

These redirects are added because mobile and desktop versions of pages may not cover the same things. These types of redirects are made when a site owner believe there’s a more appropriate place to send a user. In short, content driven redirects are based on content needs rather than any technical needs to display a page.

Redirect chains

Redirects used to be used relatively often, with each type of redirect having a clear use and purpose. However, this led to long redirect chains. Though each redirect was initially made for good reason, together they form an excessively long chain where each redirect would have to be processed before the final destination page is even shown to you.

This is what would happen in a redirect chain:

  1. Mobile device requests http://example.com
  2. Web server redirects from  “http://example.com to “http://www.example.com
  3. Mobile device then requests”http://www.example.com
  4. Web server states that “http://www.example.com has been moved to “https://www.example.com
  5. Mobile device then requests “https://www.example.com
  6. Web server says that “https://www.example.com has a mobile version at “https://m.example.com
  7. Mobile device then requests “https://m.example.com
  8. Web server delivers that page
  9. Mobile device then begins to load the page

Because all of these redirects are taking place, several seconds will have gone by before the mobile device even begins to load the page. Even if the page loads in under a second, it would still take several seconds for a user to view the page because of all the redirects.

However, the above example is actually a best case scenario for these redirects. Frequently, redirects will send a user to the wrong version of a URL and the whole process needs to start again.

What’s more, the process above is just for the HTML of your page. In some cases, this process will take place for every request too – each image, each CSS file, each JavaScript file and so on.

Removing redirects

Redirects are costly in terms of time and performance on mobiles, so ideally your site would have no redirects. However, this isn’t always possible.

General rules to follow when deciding whether to remove redirects:

  • If you only have one redirect in your redirect chain, keep it
  • If performance speed issues might potentially affect your revenue, get rid of it
  • If your pages don’t load in under a second and most of your users are on mobile devices, consider removing it

Now, let’s go through each type of redirect and how to remove them.

Removing the initial / canonical redirect

This redirect serves SEO purposes, being used to get credit for each link given to a page as some people might link to the ‘www’ version, whilst others might link to the non ‘www’ version of a page. When handling canonical redirects, you need to evaluate whether the value of this redirect still exists and whether it’s worth the redirect. To tackle the need for these redirects, Google offers lets you choose which version of your site you prefer via Webmaster Tools, without a need for a redirect to take place.

At any rate, ensure that your site wide redirects are working with other redirects like SSL and don’t redirect users to one version of a page just to redirect them again to the secure (SSL) version.

For most site owners, the way to review/update or remove it is to go to your .htaccess file and find it. It should look like this:

RewriteCond %{HTTP_HOST} ^domain.com [NC]

RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,NC]

Removing the SSL – secure pages redirect

Redirects for SSL sites are usually in place because a site owner used the quick fix method of a site wide 301 redirect to send all traffic to the secure version of their pages.

However, there’s a much better way of doing this and there’s no need for this redirect to happen at all. The solution is to use HTTP Strict Transport Security (HSTS), a tool which makes all traffic use secure pages. This means your pages will load faster and be more secure as they won’t need to use a 301 redirect.

Removing the redirect to mobile version

As mentioned, this redirect happens if you have different URLs for mobile content than you do for desktop content. To remove this redirect,  you should consider using responsive web design or dynamic serving.

Using responsive web design or dynamic serving means you won’t have this redirect because the URLs for your mobile pages are the same as the URLs for your desktop pages. If, however, you need different URLs, ensure you follow Google’s best practises.

Removing content driven redirects

Content driven redirects often don’t need to be used at all. The best fix for these redirects is to make sure your mobile and desktop content is equal. In short, for every desktop page you have, you should have a mobile page for that subject too.

It’s well worth going through your redirects and cutting them where you can. Redirects are often unnecessary, slow performance speed and have better, alternative solutions.

 

Leave a Reply

Your email address will not be published. Required fields are marked *