How can I create custom nameservers that my users can use to verify their domains

What is the name of the domain?

bilgu.org

What is the issue you’re encountering

How can I create custom nameservers

What feature, service or problem is this related to?

Nameservers

What are the steps to reproduce the issue?

I’m create a marketplace where users/sellers can list their domains.
I want them to verify their listings and issue SSL certificate for their domains.
use the for-sale lander design that we provide on their domain using nameservers like n1.mydomain.com and n2.mydomain.com

I have my application hosted on Cloudflare pages and pages functions and Using it for CDN, DDoS protection…

I have my domain registered on Namecheap.

What I have done to create the custom nameservers:

Now I tried creating custom nameservers on Namecheap and connecting with IP address that I got through dig mydomain on terminal that had been setup to run the project which is connected with custom domain feature of cloudflare pages. (The IP addresses keep changing often times probably because of serverless /edge nature of cloudflare pages so I’m confused will this work alright as IP addresses keep rotating/changing)

I have created the custom Nameservers on Namecheap and connected them with IP address I got through hosted project domain. Eg: n1: 172.64.34.25 and n2: 173.245.59.230

Added the nameserver of cloudflare to Namecheap where my domain is registered. So I can use the features of CDN, DDoS protection etc. Eg:

|NS|car.ns.cloudflare.com|

|NS|sco.ns.cloudflare.com|

Added A record within cloudflare Eg:

|A|n1|172.64.34.25|Proxied|Auto|

|A|n2|173.245.59.230|Proxied|Auto|

After all this I tried using that custom nameservers on another domain that I bought for testing purpose. Its been more than 24 hours now and I checked on whatsmydns.net it’s only propagated on few locations.

I’m still newbie and not sure what I’m doing as I did most of it with the help of chatgpt so is this the correct step to create custom nameservers and will it work.

If you require Cloudflare to operate a set of custom name servers for you, like you indicate in your explanation, you’re deeply in to an Enterprise plan.

Don’t just take arbitrary IP addresses, and point your domain name(s) to them!

Doing so will actually impose a security risk for your domain name(s).

The name server IP addresses (e.g. “ns1.bilgu.com” (“108.162.195.126”) & “ns2.bilgu.com” (“173.245.58.134”)) you configure in the delegation for your domain name (e.g. “bilgu.org”) MUST be configured to respond to DNS queries for the domain name(s) you’re pointing to them, which in your case, they aren’t.

That set up is wrong, namely due to e.g.:

  1. You’re pointing the DNS records towards arbitrary Cloudflare IP addresses.

  2. Proxy status is enabled, which is also in conflict with “custom name servers”.

Many of these test tools aren’t that great at handling failure situations.

Showing any sort of propagation for bilgu.org in your current set up, is a mistake from their end.

No.

If you’re looking to run and operate your own custom name servers, independently of Cloudflare, you will need to adjust the IP addresses, to match the actual IP addresses of your own name servers, and then switch the Proxy status, so it will become Unproxied (:grey:) / DNS-only.

1 Like

So I should create my own DNS server and use that to connect the IP address from it to nameservers that I create on namecheap right?

Is there more guide on this and affordable way to do it. I think route 53 from AWS could help with this, is there any other solutions that’s affordable and can work for this usecase.

and if possible, can you guide me through any solutions/guide to learn more about this.

If you want your customers to set their nameservers to something in your domain, you will need a minimum of two authoritative DNS servers configured to answer queries for those domains.

Doing this on a Cloudflare Business plan would require those customer domains to be added to your Cloudflare account. AWS Route 53’s white-label nameserver feature would have the same restriction.

With Cloudflare Enterprise, I don’t know if they can or would do this for you, but you could talk to them about it. It will not be cheap. I don’t know what Amazon can offer in this area but it’s probably similar.

You could get two VPS servers, and install and configure DNS server software on them, then add each customer domain to them. If you do it this way, no one whose domain is registered with Cloudflare will be able to use your service (because they won’t be able to set their nameservers to yours), and you won’t be able to point apex domains like example.com to your site on Pages; it would have to be www.example.com.

I think you might need to take a step back and look at Cloudflare for SaaS.

1 Like

Why do you want to manage their DNS? Look at SSL for SaaS as a way to provide a page w/ SSL and they can manage their own nameservers

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.