webzod
account

Shorten the redirect chain

headers.redirect.too_long · effort: minutes

Why it matters

The page is reached only after more redirects than our scanner follows (5), and each hop adds a round trip for visitors and crawlers. Usually http, www, a trailing slash and a language prefix are each redirected in a separate step; send the first request straight to the final address.

The fix

  1. Trace the chain with the command below and write down each hop and which layer (CDN, web server, application, plugin) issued it.
  2. Make the first redirect from each entry point (http, https, apex, www) go straight to the final address https://example.com/ with one 301, and drop the intermediate steps that only add a trailing slash, a language or a case change.
bash
curl -sIL --max-redirs 10 http://example.com/ | grep -iE '^(HTTP/|location:)'

The examples use example.com. Replace it with your own domain.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.