Skip to content

override_existing_dns_record flag ignored in wrangler deploy #9878

Open
@hehehenri

Description

@hehehenri

What versions & operating system are you using?

Wrangler v4.22.0

Please provide a link to a minimal reproduction

No response

Describe the Bug

I'm migrating a Cloudflare Pages project to Workers. In my new wrangler.jsonc config, I've declared the same domains that were previously used (and are still managed) by the old Pages app.

When I run wrangler deploy, it fails with:

Hostname 'example.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]

However:

  • Wrangler doesn’t expose any way to set override_existing_dns_record via the CLI or config.
  • The code in publishCustomDomains suggests an interactive prompt should appear in case of DNS conflicts, but I don’t get one.
  • I cloned the repo and hardcoded override_existing_dns_record: true, but the deploy still fails with the same error.

It seems like the flag has no effect at all, and there's currently no way to override existing DNS records during deploy, even though the error message suggests it's possible.

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't working

    Type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions