Redirecting www and root names to same tunnel

I am a rookie and so please forgive any rookie mistakes in how I explain things.
How can I redirect both the www and root names to the same cloudflare tunnel?

I use cloudflare tunnel to bypass my ISP NAT. I have a domain which is redirected to the tunnel. I have added two CNAME entries to the domain by which I try to redirect both https://www.example.com and https://example.com to the same tunnel id. But when I do that I get this warning Because CNAME records are not allowed at the zone apex (RFC 1034), CNAME flattening will be applied to this record. with https://example.com and only www.example.com works.

I want to redirect both root and www domains to the same tunnel.

First it’s not a warning and it’s expected

Post your tunnel config.

What you wanna do, assuming you want to access website at www.example.com. you need two records
that is www and non www configured and then redirect non www to www using page rule or server side

1 Like

This absolutely worked, thanks bro

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.