Too many redirects from cloudflare

1. Caddy version (caddy version):


2. How I run Caddy:

Using CaddyFile in /etc/caddy/Caddyfile

a. System environment:

Ubuntu 20.04.1 LTS

d. My complete Caddyfile or JSON config: {

 https://*, client-domain

# Set this path to your site's directory.
root * /<root_path>

# Enable the static file server.
file_server browse

@notStatic {
        not path /static/*

reverse_proxy @notStatic localhost:8000

tls <email> {

3. The problem I’m having:

I am trying to give the custom domain to a client who is using Cloudflare, when I used the domain directly in caddy file I got TOO_MANY_REDIRECTS and was not able to access it.

5. What I already tried:

I tried disabling theauto_https off but that ended up showing a white page and not coming. This site was working fine on Nginx.

1 Like

G’day @Gautham_Santhosh, welcome to the Caddy community!

One of the most common causes of infinite redirects with Caddy and Cloudflare is the Cloudflare SSL setting. More info on that here:


This topic was automatically closed after 30 days. New replies are no longer allowed.