Redirects are what takes your visitors from one location or file to another one and, done in several ways, they can seriously affect your page loading speed. How? Because time is being wasted loading one page only to be sent on to another one.
As mobile usage becomes more and more prevalent, these redirects are going to become more of an issue and if you have implemented some kind of mobile SEO solution, you need to go look at the redirects closely. Mobile users are more affected because they don’t tend to have such a good internet connection.
Some redirects may be useful but, no matter what they are, they do cause significant issues with page speed and performance. Each one that you can remove, or at least clean up, will have a positive effect on speed.
If you have no redirects on your website, then you should be serving up your content considerably faster. Redirects are an incredibly waste of time, especially if you take your mobile visitors into account.
There are two types of redirect:
Server-Side – fast and cacheable
These commonly show up as 301 or 302 redirects; HTTP is used to tell a visitor that a resource or a page has been moved. 301 is permanent, 302 is temporary. Server-side means that the web browser is doing the work of redirect and can handle it a good deal quicker than client-side requests. The browser can also cache the new file location.
Client-Side – slow and not cacheable
Most websites will have redirects on them; the most common is 301, redirecting from a non-www to a www version of a website and, as these have long been recommended for SEO purposes, many websites use them. If you have 301 redirects, keep them as they help the search engines to read and understand your website.
Google, the largest search engine in the world, recommend that you remove any redirect that is unnecessary. They say you should never:
- Link to any page that you know has a redirect on it. This will happen when you create a manual redirect but don’t edit the HTML text link, so it points to the right place
- Need any more than one redirect to get to a resource
We mustn’t forget that HTML is not the only thing our web pages load. You might think that you have no redirects but don’t forget about external scripts, CSS files or images.
You can use Google Page Speed to work out what your page calls as it loads so check to make sure that none of them are creating redirects. For example, if your site is a www site, check that you are using www to call your files and other resources.
Checking for Old Redirects
Have a look in your .htaccess file or in any other server configuration file to make sure there are no old redirects still hanging around. These might have been added for specific pages or sections of the site and, if not removed when no longer needed, server to clog your website up. In particular, look for the redirects to content that no longer exists.
There is a kind of best practice guide to work through when you are removing redirects:
- Find them
- Know why they are there
- Check to see if and how it affects other redirects or is affected by another redirect
- Remove the redirect if not required
- Update the redirect if needed
Cleaning Redirect Chains
More often than removing redirects, you will probably need to clean up redirect chains. For example, you have put a site-wide redirect on to redirect from a non-www site to a www version of it.
Then, later, you move to an https version and redirect once more. You need to make sure the redirect is not going from non-www to www to https. What it should be is non-www straight to https.
As well as checking for individual redirects that are no longer required, check your chains for extra redirects – all these do is add an extra step in that just slows things down even more.