"Error 1001 DNS Resolution Error" when setting up apex domain via Namecheap ALIAS record

We are building a platform on top of Cloudflare pages. We have more than 500 Cloudflare Pages projects and are utilizing the API to add custom domains to them.

Recently, we observed that when attempting to add a custom apex domain via API, it is not functioning as expected.

Each of our pages projects utilizes different DNS providers, such as Namecheap or others.

Even if those third-party DNS providers support CNAME Flattening via ALIAS or ANAME records, and if we add those ANAME or ALIAS records, the custom apex domains added via the API to cf pages project still do not work.

How can I fix this?

I noticed that [in this page](https://developers.cloudflare.com/pages/configuration/custom-domains/#add-a-custom-subdomain)
“To deploy your Pages project to a custom apex domain, that custom domain must be a zone on the Cloudflare account you have created your Pages project on.”

It used to work for all the sites until recently. The above message is concerning, because, if that’s true, we can’t use cloudflare pages anymore and have to move to different platform because we cant add add customer’s domain as a zone in our cf account.

Is there a way to fix this apex domain thing?

PS:

  • We are currently in Pro plan, and we can move to business plan if needed. Enterprise plan is out of reach for us.
  • I’m already aware that adding apex domain is not possible in the dashboard, and adding it via API makes it possible.
  • I wanted to move to Cloudflare for Saas, but it doesn’t support since pages already uses Cloudflare for saas underneath, we won’t be able to use again.
  • We can’t use Cloudflare workers because we host as static jamstack sites, and Cloudflare Pages is a perfect fit for the sites that we host.

We need some more info here

How so? What’s happening? Is the API request succeeding? What are you seeing visiting the sites? Got an example domain?

This is a restriction in the UI due to the fact that most third parties don’t have CNAME flattening support (it’s against DNS spec). The API can add apexes without issue

We need to know the issue first :slight_smile:

Sorry for not making it clear. We get “Error 1001 DNS Resolution error” and sometimes “Error 1014 Cross user banned” when setting up apex domain. But when they setup for www, it works perfectly.

I’m more concerned about the below line mentioned in this page.

To deploy your Pages project to a custom apex domain, that custom domain must be a zone on the Cloudflare account you have created your Pages project on.

If the above line is true, we can’t use cloudflare pages as a platform. Also I would like to know why this restriction is added which was not there earlier. I cannot expect all my users to have a zone in the same account, or even how can I force them to manage their DNS in cloudflare.

That’s interesting. This should really only happen if the custom domain isn’t active, is it definitely being validated? What’s the status of it? And got an example?

As already stated in my last reply:

It’d just be blocked through the API if it wasn’t allowed

1 Like

@WalshyMVP I apologize for the delayed response. At that time, I didn’t have an example because the user had deleted the domain name. However, there is now another website experiencing the same problem.

Here is the screenshot of the DNS record that I added via API in cloudflare dashboard
https://cln.sh/r62VRsQ8

Here is the screenshot of the DNS record
https://cln.sh/d9PNqXJL

I can see that DNS records were propagated successfully and those IPs are pointing to cloudflare.
https://cln.sh/nzcjKWqX

No idea why cloudflare is not identifying the custom domain. This is not a one time issue, a lot of users add as apex domain, and then later change it with www prefix, since they find that APEX is not working in cloudflare.