How do I redirect website from www to non-www in a tunnel?


I’m running a website using Nginx on a VPS server and recently set up Cloudflare Tunnel.

But when I access my website, it goes to www firstly and I get an “ERR_NAME_NOT_RESOLVED” error.

Instead of if i access “”, working fine.

So I created a redirect rule using Cloudflare’s Page Rule, but it doesn’t seem to work with the tunnel.

Can someone tell me how to solve this problem?

Here are my DNS and Hostname settings

Public hostnames * https://ip:443 1 * http://ip:80 0

cname proxied