Hostname 'www.<my-domain>.com' already has externally managed DNS records

{
  "$schema": "node_modules/wrangler/config-schema.json",
  "name": "project-name",
  "main": "./dist/_worker.js/index.js",
  // Update to today's date
  "compatibility_date": "2025-03-25",
  "compatibility_flags": ["nodejs_compat"],
  "assets": {
    "binding": "ASSETS",
    "directory": "./dist"
  },
  "observability": {
    "enabled": true
  },
  "vars": {},
  "hyperdrive": [
    {
      "binding": "HYPERDRIVE",
      "id": <hyperdrive-id>,
      "localConnectionString": <local-connection-string>
    }
  ],
  "routes": [
    {
      "pattern": "www.<my-domain>.com",
      "custom_domain": true
    }
  ]
}

I'm trying to configure a simple test site. I have a custom domain, and previously added it to Cloudflare. So DNS records are populated. But then adding "routes" to wrangler, when I deploy, I get the error Hostname 'www.<my-domain>.com' already has externally managed DNS records (A, CNAME, etc). Either delete them, try a different hostname, or use the option 'override_existing_dns_record' to override. [code: 100117]

Are there specific DNS entries I need to delete to get this working?
Was this page helpful?