Cloudflare Worker with root domain as custom domain issue

Hi there, I have got a Cloudflare Worker mapped to the root domain and whenever I try to access it I get 'UNKNOWN HOST' error and the brower returns "we're having trouble finding that site". If I map a subdomain to the worker it works absoloutely fine. Has anyone else encountered issues using the root domain as a custom domain for a worker? Or is there some different configuration required.
5 Replies
Walshy
Walshy•5mo ago
Sounds like there's no DNS record Are you using routes? If so, did you setup a DNS record? If custom domains, you may have hit it before the DNS propagated fully and are hitting a negative cache What's the domain?
James Eastham
James EasthamOP•5mo ago
Using custom domains, screenshot of the setup from the Cloudflare console below. I thought it was propagation as well, but the other two routes which I setup AFTER the main one just as a test worked fine
No description
James Eastham
James EasthamOP•5mo ago
Ok, please ignore. Cloudflare must have seen that I sent this message and it's now started working 😂 Is there any reason why the root domain would take longer to propgate 🤔 ? The subdomains worked immediately, the root has taken about 30 minutes
Walshy
Walshy•5mo ago
they all will have taken a couple seconds but you were too fast hitting the root, that then caused you to cache the negative lookup. So you were waiting on DNS cache to expire rather than propagation
James Eastham
James EasthamOP•5mo ago
That makes sense, thanks for the folow up 🙂

Did you find this page helpful?