Can't access AdguardHome DoH over Cloudflare Tunnel


I am trying to host a DNS over HTTPS server with Adguard Home. I have set Cloudflared that connects to Caddy that then proxies all my apps. I can access AdguardHome web UI without any problem through Cloudflare Tunnel. But for a reason I can’t find, accessing the DoH server (that is on the same subdomain and should be proxied the same way) results in a “Bad Request” error.

I have set up Caddy (with Cloudflare DNS addon) this way: {
        reverse_proxy adguardhome:443 {
                transport http {


AdguardHome correctly listens on port 443 for both the web ui and DoH over

In Cloudflare Tunnel, I have simply set the public domain redirecting to https://caddy:443 on the local machine, with TLS Origin Server name set as for automatic certificates.

My problem seems very similar to this thread:

What could cause this issue with Cloudflare and DoH hosting ? Would there be a filter somewhere ?

Thanks in advance for any answer and have a great day.