How to add a www CNAME that points to my root domain?
I have a proxied domain in cloudflare, added the following DNS record:
TYPE: CNAME
NAME: www
CONTENT: @
But when I try to access my domain using www it cannot be found 404
Any ideas?
7 Replies
Could you try changing
@
to your root domain? I'm no expert but I'm pretty sure that alias only works in the name columnWhen you add the @ it defaults to the root domain
Your server needs to be configured to answer to the www name. As far as it's concerned it's a different hostname and it doesn't know what to do with it.
I am using a cloudflare tunnel
You need to CNAME to the tunnel subdomain in that case. https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/routing-to-tunnel/dns/
Cloudflare Docs
DNS records · Cloudflare Zero Trust docs
When you create a tunnel, Cloudflare generates a subdomain of cfargotunnel.com with the UUID of the created tunnel. You can treat .cfargotunnel.com as …
Did this and it throws me a 404
You still need the server configured to answer to the www name.