SEO finding
A redirect is a chain, a loop, leads to an error, or is linked to from the site itself
SEO Warning Severity: Medium
Part of the audit Status codes and redirects. Finding id: seo.redirectProblems.
What it costs you
Every extra redirect adds a round trip before the page loads, and crawlers follow only a limited number of them.
What to do
Make each old address redirect in one step, with a 301 from the server, to the final page.
What it checks
- Chain of several redirects
- Redirects that loop forever
- Redirect leads to a broken page
- Redirect done by page refresh tag
- Redirect done by script
- Own links go through redirects
- Redirect only adds or removes a slash
How to fix it
Point internal links at the final address
- Find the links to [url]. When there are many, they come from a menu, a footer or a template: change it there.
- Replace the address in each link with [detail].
- For the final slash, pick one form for the whole site and let the CMS or the link helper print that form.
- Leave the redirect in place for visitors who arrive from outside.
How to check: Recrawl the site: no internal link points at [url].
Redirect the first address straight to the final one in nginx
- Replace /old-path with the path of [url] and the target with the final address of the chain.
- Remove the older rules that formed the chain or the loop.
- Replace a meta refresh or a JavaScript redirect with this server redirect and remove it from the page.
How to check: curl -sIL [url] shows one 301 followed by a 200.
Redirect the first address straight to the final one in Apache
- Replace /old-path with the path of [url] and the target with the final address of the chain.
- Remove the older rules that formed the chain or the loop.
- Replace a meta refresh or a JavaScript redirect with this server redirect and remove it from the page.
How to check: curl -sIL [url] shows one 301 followed by a 200.
Shorten the redirect
- Find where the redirects are set: web server, CDN, CMS or a redirect plugin. We could not detect the server, so we cannot give the exact line.
- Point the first address straight at the final one with a 301 and remove the steps in between.
- Replace a meta refresh or a JavaScript redirect with a server redirect.
How to check: curl -sIL [url] shows one 301 followed by a 200.
Thresholds
| Name | Default | Meaning |
|---|---|---|
max_hops | 1 | Redirects in a row that an address may need. More than this is reported as a chain. |