Skip to content

Redirect error in Search Console: the four causes Google names

Redirect error in Search Console has four documented causes: a long chain, a loop, a URL that grows too long, or a bad or empty URL. How to tell which one you have.

By Crawlito · 9 min read

In short

  • Google's Page indexing help lists four causes for Redirect error: a chain that was too long, a loop, a redirect URL that exceeded the maximum URL length, and a bad or empty URL in the chain.
  • Googlebot generally follows 10 redirect hops for web content, so curl with --max-redirs 10 reproduces the chain-length limit from your own machine.
  • Google says the live URL Inspection test follows redirects and tests the final URL without saying it did, so a passing live test does not show you the chain; curl does.
  • Behind Cloudflare, the Flexible SSL/TLS mode combined with an origin that redirects HTTP to HTTPS is a documented cause of endless redirect loops.
  • Validate fix only makes sense after every instance is fixed, and Google says validation typically takes up to about two weeks.
On this page

Redirect error in the Search Console Page indexing report means Googlebot started following a redirect from the URL and could not reach a final page. Google's Page indexing report help names four causes: a redirect chain that was too long, a redirect loop, a redirect URL that eventually exceeded the maximum URL length, and a bad or empty URL somewhere in the chain. One curl command against an affected URL usually tells you which of the four you have.

This is a different status from Page with redirect, which Google describes as a non-canonical URL that redirects to another page and so is not indexed itself, while the target is judged on its own. That one is often fine and is covered in Page with redirect in Search Console. Redirect error always means something broke.

Which of the four causes do you have

Run this against one of the URLs Search Console lists. It follows redirects the way a crawler would, stops at 10 hops, and prints every status line and Location header:

bash
curl -sS -IL --max-redirs 10 "https://example.com/affected-url" | grep -iE '^(HTTP|location)'

The 10 comes from Google's HTTP status code and network error documentation, which says Google's crawlers follow up to 10 redirect hops by default and Googlebot generally follows 10 for general web content. The -sS pair hides the progress bar but still prints curl's own error messages, which you need here.

Read the output against this table:

What curl showsCause Google namesWhere to look
Maximum (10) redirects followed and the hosts or paths keep changingChain too longStacked rules for http, host, slash and path changes
Maximum (10) redirects followed and the same URLs repeatRedirect loopTwo layers disagreeing: CDN and origin, or a cookie check
Each location value is longer than the one beforeURL exceeded max lengthRules that append a query string or a return URL on every hop
A 3xx with no location, or one pointing at an unreachable hostBad or empty URLApplication code that builds the redirect target

curl exits with code 47 when it hits the redirect limit, which is handy in a script that loops over a list of URLs exported from Search Console.

Chains and loops caused by URL normalisation (HTTP to HTTPS, host and trailing slash rules) are already covered elsewhere: status codes and redirects for crawlers explains chains and how to collapse them into one hop, www vs non-www covers host redirects, and trailing slash URLs covers slash loops. The rest of this post covers the causes those posts do not.

Redirect loops that only crawlers hit

A loop that happens in your browser gets noticed quickly because the site is down for everyone. The loops that end up under Redirect error are often ones a logged-in browser never sees. Two patterns are worth checking first.

Some sites redirect a visitor to a page that sets a cookie (a consent page, a region chooser, an A/B test or a "check cookies" step), then send them back to the original URL. If the original URL redirects again whenever the cookie is missing, a client that does not keep cookies goes round forever.

Googlebot behaves like that client. Google's JavaScript troubleshooting guide says HTTP cookies are cleared across page loads. An older Search Console help page on URLs not followed also warns that search engines may have trouble crawling sites that rely on cookies for navigation.

You can reproduce the difference with curl, which keeps no cookies unless you ask it to:

bash
# Without cookies, as a crawler sees it
curl -sS -IL --max-redirs 10 "https://example.com/page" | grep -iE '^(HTTP|location|set-cookie)'

# With a cookie jar, as a browser sees it
curl -sS -IL --max-redirs 10 -c /tmp/jar -b /tmp/jar "https://example.com/page" | grep -iE '^(HTTP|location)'

If the first command loops and the second ends on a 200, the redirect depends on a cookie. The fix is to serve the page without the cookie: show the consent banner or region notice on the page itself instead of redirecting, and never make a cookie a condition for receiving content.

Cloudflare SSL/TLS mode loops

Cloudflare documents a loop that can start the moment a site moves behind its proxy. In its ERR_TOO_MANY_REDIRECTS guide, Cloudflare explains that in Flexible mode it connects to your origin over HTTP. If the origin redirects HTTP requests to HTTPS, every request comes back to Cloudflare as a redirect, Cloudflare asks the origin over HTTP again, and the loop never ends.

The documented combinations and fixes:

Cloudflare settingOrigin behaviour that loopsDocumented fix
SSL/TLS mode FlexibleOrigin redirects HTTP to HTTPSRemove the origin's HTTPS redirect, or switch to Full or Full (strict) with a certificate on the origin
Full or Full (strict)Origin redirects HTTPS to HTTPRemove the origin's HTTP redirect
Always Use HTTPS onOrigin redirects HTTPS to HTTPRemove that origin redirect, or turn Always Use HTTPS off
HSTS onOrigin redirects HTTPS to HTTP, or SSL/TLS mode is OffRemove that origin redirect and use Flexible or higher, or turn HSTS off
Redirect Rules or Page RulesTwo rules send a URL back and forthReview the rules so none conflict

For the Flexible case, Cloudflare's own suggestion is to enforce HTTPS at the edge instead of at the origin, so only one layer does the HTTP to HTTPS redirect.

When the redirect URL grows too long

The third cause is the one people find hardest to picture: each hop adds something to the URL until it is too long to follow. Google does not state the exact limit in the Page indexing help. The older URLs not followed page cites a 255-byte suggestion from RFC 2616 and advises making sure you are not automatically appending information, such as a session ID, when you redirect. RFC 2616 has since been replaced: RFC 9110 recommends that senders and recipients support URIs of at least 8,000 octets. Either way, a URL that grows on every hop will eventually fail.

Typical patterns:

  • A login or consent redirect that adds ?return= with the current URL, where the current URL already contains a return= parameter, so the value is encoded again on each pass.
  • A rewrite rule that appends the original query string to a target that already has it, so ?a=1 becomes ?a=1&a=1, then four copies, and so on.
  • A tracking or session parameter added by a redirect that then redirects again.

This usually also loops, so curl stops at the hop limit. The tell is in the length of each Location value:

bash
curl -sS -IL --max-redirs 10 "https://example.com/page?a=1" \
  | awk 'tolower($1)=="location:" {sub(/\r$/, "", $2); print length($2), $2}'
32 https://example.com/page?a=1&a=1
40 https://example.com/page?a=1&a=1&a=1&a=1
56 https://example.com/page?a=1&a=1&a=1&a=1&a=1&a=1&a=1&a=1

If the numbers climb with every hop, find the rule that copies the query string. In nginx, return 301 https://example.com$request_uri; already includes the query string, so adding ?$args duplicates it. In Apache mod_rewrite, a substitution that contains its own ? replaces the original query string unless you add the QSA flag, so check which behaviour each rule actually needs. For return-URL parameters, have the application refuse to wrap a URL that already carries one.

Bad or empty URLs in the chain

The fourth cause covers redirects that point at nothing usable. The URLs not followed help page describes both halves: an empty redirect is one that "didn't point to anything", and an invalid redirect is one Google followed but could not access.

What that looks like in practice:

http
HTTP/2 302
location:
http
HTTP/2 301
location: http://localhost:3000/new-page
  • Empty Location. Application code returns a 3xx with the header unset or blank, often because a variable holding the target was empty for that URL. curl ends the chain at that 3xx.
  • Internal or development hosts. A target like localhost, an internal hostname or a staging domain that is not reachable from the internet. It may even work for you on the office network.
  • Malformed targets. Unencoded spaces, a missing host such as https:///page, or a scheme a crawler will not fetch.

A relative Location such as /new-page is not an error on its own. RFC 9110 section 10.2.2 allows a relative reference and says it is resolved against the URL that was requested. Problems start when the relative path resolves somewhere you did not intend, for example new-page without a leading slash from inside a folder.

The fix is in the code that builds the redirect: build absolute targets from a configured canonical origin rather than from request headers such as Host or X-Forwarded-Host, and return a 404 or 410 instead of a redirect when there is no valid target. If the URL needs a redirect at all, the 301 vs 302 vs 307 vs 308 guide helps you pick the right code.

How to confirm the fix in Search Console

The URL Inspection tool needs care with redirects. Google's Page indexing help says the live URL Inspection test follows redirects and then tests the final URL, but does not indicate that it followed a redirect. A passing live test therefore tells you the destination can be fetched, not how many hops it took or whether every path to it works. So check the chain and the destination separately:

  1. Run the curl command from the first section again and confirm it ends on a 200 within one or two hops.
  2. Inspect the final target URL on its own and run Test live URL to confirm Google can fetch it.
  3. If the error came from a cookie or region check, repeat the curl test without a cookie jar, since that is closer to what Googlebot sees.

Google's Page indexing help also suggests a tool such as Lighthouse for more detail about the redirect.

Then fix the sources that keep sending Google to the broken URL: internal links, sitemap entries and canonical tags should point at the final URL directly.

When to click Validate fix

The Page indexing help says to fix all instances of the issue first, then click Validate fix, and not to click it again until validation has succeeded or failed. Validation typically takes up to about two weeks, and in some cases much longer. Google says validation stops when it finds a single remaining instance of the issue, so spot-check a handful of listed URLs with curl before starting. Search Console validation failed explains the states and what to do when a run does not pass.

Frequently asked questions

Is Redirect error the same as Page with redirect?

No. Page with redirect means the URL redirects to another page and is not indexed itself, while the target is evaluated on its own. Redirect error means Google could not complete the redirect, so it reached no page at all.

How many redirects does Googlebot follow?

Google's crawler documentation says Googlebot generally follows 10 redirect hops for general web content, and other Google crawlers may have different limits. Aim for one hop from any old URL to its final destination.

Why does the URL work in my browser but show Redirect error?

Your browser keeps cookies and may have cached an HSTS policy or a redirect, while Googlebot clears cookies across page loads. Test with curl, which keeps no state by default, to see what a crawler sees.

Can a relative Location header cause a redirect error?

Not by itself. RFC 9110 allows relative references in Location and resolves them against the requested URL, but a relative path without a leading slash can resolve to a URL you did not intend.

Do I have to click Validate fix?

No. Google says it updates the instance count whenever it crawls a page with a known issue, whether or not you requested validation. Validation is a way to track the affected URLs, and it only makes sense once every instance is fixed.

Check the URLs that matter

A loop, an empty Location or an unreachable target leaves every client without a page, AI crawlers included, and OpenAI, Anthropic and Perplexity do not publish redirect limits at the time of writing. After you fix the rules, run the free single-page check on an important URL as a next step; it needs no account.

Filed under Access and robots.txt. Topics: redirects, search-console, google, curl, troubleshooting