{
  "id": 22007968,
  "title": "A Cloudflare Worker route on a subdomain does nothing without a DNS record",
  "url": "https://urgent.news/2026/11/26/a-cloudflare-worker-route-on-a-subdomain-does-nothing-without-a-dns",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-26T17:02:07.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mohamedgado/a-cloudflare-worker-route-on-a-subdomain-does-nothing-without-a-dns-record-2kn6"
  },
  "original_language": "en",
  "account": "A Cloudflare Worker route on a subdomain only functions when a request for that specific hostname reaches Cloudflare. For this to happen, the hostname must have a DNS record in the zone, and this record must be proxied, indicated by the orange cloud symbol. If the record is absent, the subdomain name cannot resolve, and Wrangler deploy will not alert the user. When the Worker serves the entire site without an origin server, the record to add is a proxied AAAA pointing at 100::, which is the IPv6 discard prefix. This record ensures that if the proxy is ever disabled, the hostname points to nothing rather than to another server. The author inadvertently created a situation where a subdomain they had deployed for a brief period failed to work correctly. To prevent this issue, they implemented a check within their deploy tooling to ensure that every Worker host possesses its DNS record. The explanation provided by Cloudflare for why a Worker route may not work on a subdomain is that while a route directs Cloudflare to the appropriate Worker for handling requests for a certain hostname and path, it does not publish the hostname itself. DNS is responsible for resolving the hostname. Consequently, when a subdomain lacks a DNS record, a browser's lookup will return an NXDOMAIN error (displayed as DNS_PROBE_FINISHED_NXDOMAIN in Chrome), the request will never reach Cloudflare, and the Worker route will not have the opportunity to match.",
  "summary": "A Cloudflare Worker route like app.example.com/* only runs when a request for that hostname reaches Cloudflare. For that, the hostname needs a DNS record in the zone, and the record has to be proxied (the orange cloud). Without one the name doesn't resolve at all, and wrangler deploy still succeeds without a warning. When the Worker is the whole site and there is no origin server, the record to…",
  "key_points": [
    "A Cloudflare Worker route requires a DNS record for the subdomain to function.",
    "DNS record must be proxied with the orange cloud symbol in the zone.",
    "Absence of DNS record results in NXDOMAIN error and Worker route not matching."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}