I have a custom domain for my cloudflare worker page. Should the cname record be proxied?
Yes, If your worker is on the route worker.example.com/*
then worker.example.com
must be proxied. If the CF proxy is disable and CF isn’t receiving traffic, the worker will never trigger.
2 Likes
Does the url i use as value for the cname record matter? Or does the cloudflare proxy just automatically redirect the request to the worker when there’s a worker with a corresponding domain name, regardless of what the actual cname record is?
If you’re using a subdomain purely for workers, it should be an A
record with the IP 192.0.2.1
(a reserved example IP). If a worker is set up for the entire subdomain like worker.example.com/*
it will always go to the worker and never to the backend IP, unless your worker itself tries to fetch()
the subdomain.
1 Like