Hostname already has externally managed DNS records

What is the name of the domain?

What is the error number?

100117

What is the error message?

Hostname 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.

What is the issue you’re encountering

Trying to use a domain with my Astro project, deploying with wrangler fails

What steps have you taken to resolve the issue?

I created a DNS record for a domain I own. I bought it on Godaddy, and imported it to Cloudflare.
But when I try and deploy with wrangler with the following, I get the mentioned error:

  "routes": [
    {
      "pattern": "www.<my-domain>.com",
      "custom_domain": true
    }
  ]

Do I need to manually delete the www CNAME or any other specific DNS records to get this working?

If you’re deploying a site to Pages or Workers, yes, you mustn’t create DNS records for it manually. They will be created for you.

1 Like