How do I setup custom nameservers on Cloudflare?

You may be wondering what custom nameservers on Cloudflare are. They are basically nameservers with your own naming system on the nameservers itself. You can also call them “vanity nameservers”.

On Cloudflare, you can create and enable nameservers which reflect your own domain name (eg. You can use them in place of your Cloudflare assigned nameservers (replacing them). Such that when someone looks up your nameservers, they will see the following:

[VuLong ~]$ dig ns +short

Please note that custom nameservers have the following limitations:

  • You must have between two and five custom nameservers
  • The custom nameservers can only be created as subdomains of (e.g. and
  • When custom nameservers are created, glue records need to be created at your registrar with the IP addresses of your custom nameservers. Failure to do so can cause all DNS lookups for your site to fail. Further information can be found here: Can I get vanity or custom nameservers using Cloudflare?
  • Note: Your assigned Cloudflare nameservers will continue to work even after custom nameservers are enabled.

Here’s an example of how I have enabled this for my domain –

Set up custom nameservers on Cloudflare

Set up glue records reflecting IPv4 address and IPv6 address onto your domain name registrar. In my case, I did this on my domain name registrar –

Then test this out. You can use something like this free online DNS service to make it easier to check

Happy testing and set up!

Note – this is only available on the Business and Enterprise plans.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *