---
title: How do I resolve "err_too_many_redirects" when using a Cloudflare proxy with Vercel?
description: Information about how to resolve the "err_too_many_redirects" error when using a Cloudflare proxy with Vercel.
url: /kb/guide/resolve-err-too-many-redirects-when-using-cloudflare-proxy-with-vercel
canonical_url: "https://vercel.com/kb/guide/resolve-err-too-many-redirects-when-using-cloudflare-proxy-with-vercel"
published: 2025-11-03
last_updated: 2025-11-10
authors: Justin Vitale
related:
  - /docs/custom-domains
  - /docs/platform/projects
  - /docs/platform/deployments
  - /docs/integrations/cloudflare
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---
<!-- docsgraph:related -->
## Related pages

> **For AI agents:** Follow these links to understand how this page connects to the rest of the Vercel ecosystem. For the full cross-link map (inbound, outbound, prerequisites, and semantic neighbors), see the .graph.md link below.

- [Reverse Proxy Servers and Vercel](https://vercel.com/docs/security/reverse-proxy?from=related) — Learn why reverse proxy servers are not recommended with Vercel's firewall.
- [Deploying & Redirecting Domains](https://vercel.com/docs/domains/working-with-domains/deploying-and-redirecting?from=related) — Learn how to deploy your domains and set up domain redirects with this guide.
- [How do I resolve "ERR_SSL_PROTOCOL_ERROR" with Vercel?](https://vercel.com/kb/guide/resolve-err-ssl-protocol-error-with-vercel?from=related) — Information about how to resolve the "ERR_SSL_PROTOCOL_ERROR" error with Vercel.
- [Should I use Cloudflare in front of Vercel?](https://vercel.com/kb/guide/cloudflare-with-vercel?from=related) — Information on using Cloudflare together with Vercel.
- [Why is my domain not automatically generating an SSL/TLS certificate?](https://vercel.com/kb/guide/domain-not-generating-ssl-certificate?from=related) — Information on why a domain may not be automatically generating an SSL/TLS certificate.
- [Why is running another CDN on top of Vercel not recommended?](https://vercel.com/kb/guide/why-running-another-cdn-on-top-of-vercel-is-not-recommended?from=related) — Information about possible strategies when using a CDN on top of Vercel.
- [How to troubleshoot stale content returned from the Edge Network when using an external proxy or CDN](https://vercel.com/kb/guide/how-to-troubleshoot-stale-content-returned-from-the-edge-network-when-using-an-external-proxy-or-cdn?from=related) — Learn how to diagnose and fix stale content issues when using external proxies or CDNs with Vercel. Understand troublesh

Full cross-link map for this page: [/kb/guide/resolve-err-too-many-redirects-when-using-cloudflare-proxy-with-vercel.graph.md](/kb/guide/resolve-err-too-many-redirects-when-using-cloudflare-proxy-with-vercel.graph.md)
<!-- /docsgraph:related -->


When [assigning a domain](https://vercel.com/docs/custom-domains#adding-a-domain) to a [Project](https://vercel.com/docs/platform/projects) on Vercel that is currently using a Cloudflare proxy, you may encounter the error `"err_too_many_redirects"`. In this article, we will explain why this error occurs and what changes you need to make to resolve it.

## Why Does This Error Happen?

This error occurs when your Cloudflare SSL/TLS configuration is set to "Flexible". Under that scenario, Cloudflare will send requests from their servers to your Vercel [deployment](https://vercel.com/docs/platform/deployments) using HTTP instead of HTTPS. After Vercel answers Cloudflare's request, they will forward the response using HTTPS.

Since Vercel will automatically upgrade all HTTP requests to use SSL when a certificate is present, a [308 status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308#:~:text=The%20HyperText%20Transfer%20Protocol%20) is sent to the client, causing a redirect to the same location.

Here is a quick summary of the issue:

- Cloudflare is serving `https://example.com` and making requests to `http://example.com` on Vercel.
  
- Vercel identifies an unprotected request to `http://example.com` and sends a [308 status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308#:~:text=The%20HyperText%20Transfer%20Protocol%20) redirect to `https://example.com`.
  
- Cloudflare will forward the redirect to the user. However, since the client is already on `https://example.com`, it will generate a redirect to the same location, causing a loop.
  

## Solution

To fix the issue, you need to set the "SSL/TLS" option in Cloudflare to "Full". It is important to also follow the instructions in our [Cloudflare guide](https://vercel.com/docs/integrations/cloudflare) so the domain keeps working without any issues.