Worker Route Registration Does Not Auto-Create DNS Records
Worker Route Registration Does Not Auto-Create DNS Records
Section titled “Worker Route Registration Does Not Auto-Create DNS Records”Context
Section titled “Context”When wrangler deploy --env dev registers a custom route (api.adventive.dev/*) via
routes in wrangler.toml, Cloudflare registers the route trigger on the edge but does
not automatically create a DNS record for the hostname. Without a proxied DNS record,
the hostname doesn’t resolve and the route is unreachable — curl api.adventive.dev returns
Could not resolve host.
Decision
Section titled “Decision”DNS records must be created manually (or via Terraform/API) before or alongside the first deploy. The record required for a Workers-only hostname (no origin server) is:
| Field | Value |
|---|---|
| Type | AAAA |
| Name | api (i.e., api.adventive.dev) |
| Content | 100:: |
| Proxy status | Proxied (orange cloud) |
100:: is the standard IPv6 discard-prefix used as a placeholder for Workers-only routes.
Cloudflare intercepts the request at the edge before it ever reaches a real host.
Consequence
Section titled “Consequence”Add DNS record creation as an explicit step in the per-environment deploy runbook
(RUNBOOK.md §Deploy procedure). For stg and prd, provision the AAAA record before the
first wrangler deploy. For dev, the record was created manually on 2026-04-29.
This is not a Cloudflare bug — it is by design. Route registration and DNS are separate Cloudflare primitives. The behavior is consistent with how Cloudflare Workers routes work for all custom hostnames.