Redirect cloudflare tunnel subdomain using cname

I have a cloudflare tunnel configured at tunnel.example.com.

Now i want to access the tunnel using example.com. I created a cname record pointing to the subdomain like this


but i can’t access tunnel.example.com via example.com.

I think you also need to edit the cloudflare tunnel config file so that it responds to that hostname

More precisely, the Ingress rule needs to have example.com configured so that cloudflared knows how to respond with the incoming example.com request.

how can i configure one?
ingress rules needs at least one host right?

What’s your current config.yml?

tunnel: xyz.json

credentials-file: ./root/xyz.json

ingress:

tunnel: xyz.json

credentials-file: ./root/xyz.json

ingress:

hostname: tunnel.example.com
service: http://localhost:3000
hostname: example.com
service: http://localhost:3000
service: http_status:404

This should work I guess

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