# 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.

Canonical: https://scaplet.com/errors/cdn/vercel-too-many-redirects

Guide Error · CDN and hosting errors

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 with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fvercel-too-many-redirects%20(%22Vercel%3A%20too%20many%20redirects%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fvercel-too-many-redirects%20(%22Vercel%3A%20too%20many%20redirects%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fvercel-too-many-redirects%20(%22Vercel%3A%20too%20many%20redirects%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fvercel-too-many-redirects%20(%22Vercel%3A%20too%20many%20redirects%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 5 parts, 4 minutes.

1. [What a redirect loop is 01](#what-a-redirect-loop-is)
2. [Trace the loop in one command 02](#trace-the-loop-in-one-command)
3. [Causes on Vercel, with the fix for each 03](#causes-on-vercel-with-the-fix-for-each)
4. [When Cloudflare sits in front of Vercel 04](#when-cloudflare-sits-in-front-of-vercel)
5. [Crawl and indexing impact 05](#crawl-and-indexing-impact)

_01_Explained

## 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.

_02_How 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`.

_03_Common loop sources

## Causes on Vercel, with the fix for each

Cause

### `trailingSlash: true` plus a rule that strips the slash

What it looks like

`/about` goes to `/about/` (308), then a rule sends it back to `/about`

Fix

Pick one form. With `trailingSlash: true` Vercel redirects `/about` to `/about/` with a 308 and leaves paths with a file extension alone

Cause

### `trailingSlash: false` plus a rule that adds a slash

What it looks like

`/about/` goes to `/about` (308), then back

Fix

Same: one setting, no opposing rule

Cause

### `cleanUrls: true` and an `.html` redirect

What it looks like

Visiting `/about.html` redirects to `/about` (308); a rule sending `/about` to `/about.html` loops

Fix

Remove the redirect that adds `.html`

Cause

### A `redirects` rule that matches its own destination

What it looks like

Source `/:path*` redirects to a destination that matches the same source

Fix

Scope with `has` on the host. Vercel notes that matching the exact source hostname avoids redirecting the destination back to itself

Cause

### A www or apex redirect set twice

What it looks like

A domain redirect in the dashboard and a `vercel.json` redirect pointing at each other

Fix

Keep one: either the Domains section or a rule, not both

Cause

### Cloudflare proxy with the wrong SSL mode

What it looks like

Browser stuck between `http` and `https`

Fix

See the Cloudflare table below

vercel.json: redirect only the vercel.app hostname, so the destination does not match

```
{ "$schema": "https://openapi.vercel.sh/vercel.json", "redirects": [ { "source": "/:path*", "has": [{ "type": "host", "value": "your-project\\.vercel\\.app" }], "destination": "https://www.example.com/:path*", "permanent": true } ] }
```

vercel.json: pick one trailing slash behaviour

```
{ "$schema": "https://openapi.vercel.sh/vercel.json", "trailingSlash": false }
```

_04_Cloudflare 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](/glossary/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

**Check the proxy first when only the custom domain loops**Cloudflare says Full or higher requires an [SSL certificate](/glossary/ssl-certificate) configured at your origin server. Compare your SSL/TLS encryption mode with what the origin does before editing project rules.

_05_Explained

## 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](/seo-issues/redirect-loops) and [redirect chains](/seo-issues/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. 01 [MDN: Redirections in HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Redirections) developer.mozilla.org · checked 2026-11-01
2. 02 [Vercel Docs: Project configuration with vercel.json](https://vercel.com/docs/project-configuration/vercel-json) vercel.com · checked 2026-11-01
3. 03 [Vercel Docs: Redirects](https://vercel.com/docs/redirects) vercel.com · checked 2026-11-01
4. 04 [Vercel Docs: Domain troubleshooting](https://vercel.com/docs/domains/troubleshooting) vercel.com · checked 2026-11-01
5. 05 [Cloudflare docs: ERR_TOO_MANY_REDIRECTS](https://developers.cloudflare.com/ssl/troubleshooting/too-many-redirects/) developers.cloudflare.com · checked 2026-11-01
6. 06 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-11-01

Questions

## Asked a lot.

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

_01_ What 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.

_02_ How 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.

_03_ Does 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.

_04_ Why 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.

## Keep learning

[All errors](/errors)

[Learn Cloudflare too many redirects (ERR_TOO_MANY_REDIRECTS) CDN and hosting errors](/errors/cdn/cloudflare-too-many-redirects) [Related Redirect chains Redirects](/seo-issues/redirect-chains) [Read next HTTP 308 Permanent Redirect HTTP status codes](/errors/http/308) [Do Run a free site audit Free, about two minutes](/site-audit)

More Vercel errors
[Vercel build failed](/errors/cdn/vercel-build-failed) [Vercel domain not working](/errors/cdn/vercel-domain-not-working) [Vercel FUNCTION_INVOCATION_TIMEOUT](/errors/cdn/vercel-function-invocation-timeout) [Vercel 413: FUNCTION_PAYLOAD_TOO_LARGE](/errors/cdn/vercel-payload-too-large) [Vercel 429: Too Many Requests](/errors/cdn/vercel-429)

Nearby in errors
[100 Continue](/errors/http/100) [101 Switching Protocols](/errors/http/101)

More in CDN and hosting errors
[Heroku H13: Connection closed without response](/errors/cdn/heroku-h13) [Heroku H14: No web processes running](/errors/cdn/heroku-h14) [Netlify build failed](/errors/cdn/netlify-build-failed) [Netlify function timeout](/errors/cdn/netlify-function-timeout) [Render 502 Bad Gateway](/errors/cdn/render-502) [S3 Access Denied (403 Forbidden)](/errors/cdn/s3-access-denied) [Vercel 413: FUNCTION_PAYLOAD_TOO_LARGE](/errors/cdn/vercel-payload-too-large) [Vercel 429: Too Many Requests](/errors/cdn/vercel-429) [Vercel 500: Internal Server Error](/errors/cdn/vercel-500) [Vercel build failed](/errors/cdn/vercel-build-failed) [Vercel domain not working](/errors/cdn/vercel-domain-not-working) [Vercel FUNCTION_INVOCATION_TIMEOUT](/errors/cdn/vercel-function-invocation-timeout) [Vercel: too many redirects](/errors/cdn/vercel-too-many-redirects) [Akamai reference number](/errors/cdn/akamai-reference-number) [ALB 503 Service Unavailable](/errors/cdn/alb-503) [ALB 504 Gateway Timeout](/errors/cdn/alb-504-gateway-timeout) [API Gateway 403 Forbidden](/errors/cdn/api-gateway-403-forbidden) [API Gateway 504 Gateway Timeout](/errors/cdn/api-gateway-504) [AWS 502 Bad Gateway](/errors/cdn/aws-502-bad-gateway) [AWS Amplify 404 Not Found](/errors/cdn/amplify-404) [AWS EC2: Connection timed out](/errors/cdn/aws-ec2-connection-timed-out) [AWS Lambda 502 Bad Gateway](/errors/cdn/aws-lambda-502) [AWS Lambda timeout](/errors/cdn/lambda-timeout) [Azure Front Door 502](/errors/cdn/azure-front-door-502)

Terms on this page
[HTTPS](/glossary/https) [SSL certificate](/glossary/ssl-certificate)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

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

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
