Free auditStart free
GuideError · CDN and hosting errors

Vercel: too many redirects

A redirect loop on a Vercel site shows as too many redirects. Trace it with curl, then fix vercel.json rules, trailing slash settings, domain redirects or a proxy.

4 min
read
6
sources
Oct 30, 2026
updated
Scaplet Editorial Team
author
In one line

A "too many redirects" error on a Vercel site means a redirect chain never ends. Trace it with curl -IL, then look for rules that send a URL back to itself: redirects in vercel.json, a trailingSlash setting that fights another rule, a domain redirect, or a proxy such as Cloudflare in front using a mismatched SSL mode.

30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01Explained

What a redirect loop is

MDN defines it: "Redirection loops happen when additional redirections follow the one that has already been followed." MDN adds that the server sometimes cannot detect it, because a loop can spread over several servers. In that case browsers detect it. Firefox shows "Firefox has detected that the server is redirecting the request for this address in a way that will never terminate", and Chrome shows "This Webpage has a redirect loop" in the version MDN describes. Cloudflare titles its troubleshooting page ERR_TOO_MANY_REDIRECTS and describes it as visitors getting stuck in a redirect loop.

Vercel has no dedicated error page for this one. The loop is made by your configuration, so the job is to find which two hops point at each other.

02How it works

Trace the loop in one command

Read the HTTP and location pairs in order. A loop repeats the same two locations, such as /about to /about/ and back, or http to https and back. The first repeated pair tells you which rule to open. Google follows up to 10 redirect hops by default, so a long chain can fail for crawlers even when it ends.
Follow redirects and print each hop
curl -sIL --max-redirs 10 https://www.example.com/about | grep -i -E '^(HTTP|location)'
  1. 01

    Capture the first two hops

    Note the status codes. Vercel documents 308 for the trailingSlash and cleanUrls redirects, and 307 or 308 for a redirects entry depending on permanent.

  2. 02

    Identify who sent each hop

    A server: Vercel response header marks Vercel. A different server value or a Cloudflare header means something in front of Vercel is redirecting.

  3. 03

    Test the bare Vercel hostname

    Request your-project.vercel.app with the same path. If it works, the loop involves your custom domain or a proxy; if it loops, the loop is in your project config.

  4. 04

    Fix one hop, retest

    Change one rule at a time and rerun the curl.

04Cloudflare settings that loop against an origin that redirects

When Cloudflare sits in front of Vercel

Cloudflare lists three sources of this error: an SSL/TLS encryption mode misconfiguration, settings on the Edge Certificates page, and a misconfigured redirect rule. The documented pairs are below. Vercel's own domain guidance says that if you use a proxy it should not add proxy-level redirects on the certificate challenge path, and for Cloudflare you can use DNS only instead.
Cloudflare setting

Encryption mode Flexible (Cloudflare to origin over HTTP)

Origin behaviour that loops
Origin redirects all HTTP requests to HTTPS
Fix per Cloudflare
Remove HTTP redirects from the origin, or use Full or higher
Cloudflare setting

Encryption mode Full or Full (strict)

Origin behaviour that loops
Origin redirects all HTTPS requests to HTTP
Fix per Cloudflare
Remove HTTP redirects from the origin
Cloudflare setting

Always Use HTTPS on

Origin behaviour that loops
Origin redirects HTTPS to HTTP
Fix per Cloudflare
Remove the origin redirect, or turn Always Use HTTPS off
Cloudflare setting

HSTS on

Origin behaviour that loops
Origin redirects HTTPS to HTTP, or encryption mode Off
Fix per Cloudflare
Remove the origin redirect or change the encryption mode
05Explained

Crawl and indexing impact

Google says it follows up to 10 redirect hops, ignores content from the redirecting URL, and processes the final target. A loop never reaches a target, so the URL cannot be crawled. Redirect status codes also carry signals: 301 and 308 are a strong signal that the target should be processed, and 302 and 307 a weak one. Read redirect loops and redirect chains for how to find affected URLs, and use the 308 for permanent moves.

Sources · 6

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • mozilla.org
  • vercel.com
  • cloudflare.com
  • google.com
  1. 01MDN: Redirections in HTTPdeveloper.mozilla.org · checked 2026-11-01
  2. 02Vercel Docs: Project configuration with vercel.jsonvercel.com · checked 2026-11-01
  3. 03Vercel Docs: Redirectsvercel.com · checked 2026-11-01
  4. 04Vercel Docs: Domain troubleshootingvercel.com · checked 2026-11-01
  5. 05Cloudflare docs: ERR_TOO_MANY_REDIRECTSdevelopers.cloudflare.com · checked 2026-11-01
  6. 06How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-11-01
Questions

Asked a lot.

4 questions people ask next, answered from the sources on this page.

01What causes too many redirects on Vercel?

Two rules, settings or layers that redirect to each other. The documented candidates are opposing trailingSlash and redirects rules, a cleanUrls conflict, duplicate domain redirects, and a proxy such as Cloudflare with an SSL mode that fights the origin.

02How do I debug a Vercel redirect loop?

Run curl -sIL --max-redirs 10 on the failing URL and read the status and location of each hop. The first repeated pair shows which rule to fix. Test the .vercel.app hostname to separate project config from a domain or proxy problem.

03Does Vercel use 301 or 308 for permanent redirects?

A redirects entry with permanent: true is a 308, and the trailingSlash and cleanUrls redirects are 308 too. Google treats 308 like 301.

04Why does it only fail with my custom domain?

The bare Vercel hostname skips your domain settings and any proxy. If it works and the custom domain loops, check domain redirects in the Domains section and, if Cloudflare is in front, its SSL/TLS mode.

Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane