Not able to add worker with custom domain

For Workers & Pages, what is the name of the domain?

we-ace.com

What is the error message?

Hostname we-ace.com already has externally managed DNS records, Either delete them, try different hostname, or use the option ‘override_existing_record’ to override.

What is the issue or error you’re encountering

We have A record in our Cloudflare account for domain. Earlier have worker configured with custom domain we-ace.com, which is passing geolocation details in the header of every request coming to our server. For some reasons we removed that worker. Now again we want to add worker with custom domain, but not able to add so. Getting exception saying a record is already available, try with different domain.

What steps have you taken to resolve the issue?

We have tried to add worker but not able to do so. Also we tried to add worker after deleting the A record but the application stops working. Already tried to connect with Cloudflare regarding this issue, but not getting any response from them.

Hey there,

From the description of your problem, it sounds like a worker route would be a better fit than a Worker custom domain. A worker route would allow you to have an A/CNAME record for your origin server in DNS and the worker would run before the request reaches your origin server if the worker route matches with the request URL.