When I audit websites that have a temporary redirect problem, it often stems from two areas. The first would be a manual piece around users creating redirects off their own back, either through the .htaccess file, CMS or IIS – forgetting to turn them off. The other issue I see is 307 status codes which also indicate this resource is being served through a temporary URL – this can either be a technical or manual error.
The main element of these redirection issues is identifying them and spending some time to get to the root cause. If they are being setup up regularly there is a risk that they will grow in number over time – or perhaps start something called a redirection chain, a much more sinister follow on the issue with temp redirects is not founds (4XX error codes). Not founds can often be generated when temporary URLs are still hardcoded but lead nowhere.
How do you find temporary redirection errors?
The good news is, with these being a front end issue, they can be easy with website crawling software such as SEMRush, ahrefs, SiteBulb or Screaming Frog. Once you complete the full site crawl there will be a section dedicated to redirection errors, often branching down into perm and temp redirects. Once you find them you’ll need to identify where they are currently linking from, why they are there and if there is any long term issues which need to be considered e.g. is the CMS creating these automatically in bulk?
How do I fix temporary redirection errors?
The two key ways to fix these issues are first, business as usual tasks, removing the redirection and pointing the URL to the main source. This can be a fruitless task unless you look at the second half of this fix, identify why they are being created and try and reduce or suppress the volume of temp redirections being put in place – I’ve known many Marketing Managers, with the best will in the world, spending weeks trying to fix redirection loops or errors one by one when there was a system or bug in the background creating them faster than they could be fixed.
How do I prevent redirection errors from occurring?
The main preventative measure when it comes to setting up temp redirects is to not set them up, sounds simple. There is a limited range of reasons why you would use temp redirects and I’d encourage you to track all the ones you set up. If you are not setting them up and your site is generating them, I’d look at the website code. Look in areas such as minifying plugins, resource URLs or CDNs as they can set these up as caches are being built or by default (although very rarely).
Additional comments on temp redirects
-
I’m not a fan of these redirects and I never typically use them, 302 or 307 are often the smoking gun.
-
The silver lining of these specific errors is they are often easily identified by Search Engine Optimisation crawling software.
-
You can often identify these sources, in files such as IIS or .htaccess which can showcase all the redirections by typing into a specific file type.
-
If you do set up an ad-hoc redirection then ensure you go back and validate it is still required, many a time redirections have been forgotten about which can cause havoc over the longer term, especially if they are increasing in number.