You built your app with Lovable, Bolt, Cursor or Replit, put it on Vercel or another host, and pointed your own domain at it through Cloudflare. The hosting address, such as your-app.vercel.app, loads fine. Your custom domain does not: the browser shows ERR_TOO_MANY_REDIRECTS, or in some browsers "The page isn't redirecting properly". Nobody can reach your sign-up page, your login or your checkout, and the app itself is not broken at all.
The short answer
Cloudflare's docs say this error means visitors are stuck in a redirect loop, and that it is commonly caused by the SSL/TLS encryption mode, settings on the Edge Certificates page, or a redirect rule.
The most common version is the Flexible encryption mode. In Flexible mode, Cloudflare talks to your host over plain HTTP. Your host redirects every HTTP request to HTTPS. Cloudflare asks over HTTP again, and the loop never ends. Vercel's guide to using Cloudflare describes exactly this: Cloudflare connects to Vercel over HTTP, Vercel redirects to HTTPS, and the cycle repeats.
The fix is to make Cloudflare talk to your host over HTTPS, or to take Cloudflare's proxy out of the path.
Check that this is your problem
- Open your app's hosting address (for example the
vercel.appone) in a private window. If it loads and your custom domain does not, the app is fine and the problem is between your domain and your host. - In the Cloudflare dashboard, open your domain, go to DNS, then Records, and look at the records for your app. An orange cloud means Proxied: traffic goes through Cloudflare first. A grey cloud means DNS only.
- If the records are proxied, go to SSL/TLS, then Overview, and see which encryption mode is set.
Fix it
Option 1: set the encryption mode to Full (strict)
On the SSL/TLS Overview page, choose Full (strict). Cloudflare's docs say Full and Full (strict) send encrypted requests to your host over HTTPS, and that Full (strict) also checks your host's certificate. Vercel's guide says to use Full (strict) when Cloudflare proxies traffic to Vercel.
Cloudflare's docs note that your zone may use Automatic SSL/TLS, which picks a mode for you, or Custom SSL/TLS, where you choose one yourself. If you see Flexible under a custom setting, that is the one to change.
Option 2: switch the records to DNS only
You can keep Cloudflare as your DNS provider without its proxy. Vercel's guide says to add your domain in your Vercel project under Settings, then Domains, add the DNS records Vercel shows you, set those Cloudflare records to DNS only, and then confirm in Vercel that the domain is verified and has a certificate. Your host then handles HTTPS by itself and there is nothing in between to loop.
Vercel's guide also warns: before you switch an existing proxied domain to DNS only, check that Vercel shows a publicly trusted certificate for it, because a Cloudflare Origin CA certificate is meant for Cloudflare's connection to your host and browsers may reject it.
If it still loops: look for redirects that fight each other
Cloudflare's docs list other causes:
- Always Use HTTPS on the Edge Certificates page loops if your host redirects HTTPS back to HTTP.
- HSTS loops if your host redirects HTTPS to HTTP, or if the encryption mode is Off.
- Redirect rules or Page Rules that conflict with each other, or with a redirect your host already does.
A common clash is the www redirect. If Cloudflare sends www.yourdomain.com to yourdomain.com while your host sends yourdomain.com back to www, the browser bounces forever. Pick one place for that redirect, usually your host's domain settings, and turn the other off.
You can see the loop for yourself in your browser's developer tools: open the Network tab, load your domain, and look for the same addresses repeating with 301 or 308 responses.
On Lovable
Lovable's docs say that if your domain goes through Cloudflare or a similar proxy, you should connect it in Project, then Settings, then Domains, expand Advanced and turn on Uses Cloudflare or similar proxy. Lovable then uses a CNAME record and issues the certificate once that record is live. Lovable also says that in this mode it does not configure, validate or monitor your proxy, so the Cloudflare encryption mode and redirect rules are yours to get right. If you do not need the proxy, setting the records to DNS only keeps Cloudflare out of the way.
Test like a new visitor
Browsers can remember redirects, so after the change open your custom domain in a fresh private window. Check both yourdomain.com and www.yourdomain.com, then sign up, log in and start a checkout. If your app sends emails with links back to your domain, click one of those too.
Paste this into your AI tool
> My app loads on its hosting address but my custom domain shows ERR_TOO_MANY_REDIRECTS. The domain's DNS is on Cloudflare. Please check the app's code and config (for example vercel.json, next.config, netlify.toml or any middleware) for redirects between http and https or between www and the bare domain, list every redirect you find, and tell me which ones could conflict with a Cloudflare redirect rule or with Cloudflare's Flexible SSL mode. Do not change DNS or hosting settings yourself; give me the exact settings to check in Cloudflare and in my host's domain settings.
Catch it before your users do
A redirect loop is easy to miss because your own browser may still show a cached copy of the site, or you may only ever visit the hosting address. Scheduled testing from FlowCanary is launching by 30 November 2026. Once it is live, it will test the flows a new visitor can do in your app, such as sign-up and checkout, in a real browser on a schedule, with logged-in flows on Pro, and tell you in plain English when one breaks, with a fix prompt for Lovable, Bolt, Cursor or Replit. Until then, the free check works today: paste your live URL and it opens the page in a real browser and reports JavaScript errors, failed requests and blank pages.
Sources
- Cloudflare: ERR_TOO_MANY_REDIRECTS
- Cloudflare: Encryption modes
- Vercel: Using Cloudflare with Vercel
- Lovable: Connect a domain you own