How do I setup custom nameservers on Cloudflare?

Feb 7, 2019 4:01:58 PM / by Vu Long Tran

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. ns.dejavuguides.com). 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 ~]$&nbsp;dig&nbsp;dejavuguides.com&nbsp;ns +short<br>ns1.dejavuguides.com.<br>ns2.dejavuguides.com.<br>ns3.dejavuguides.com.<br>

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 dejavuguides.com (e.g. ns1.dejavuguides.com and ns2.dejavuguides.com).
  • 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 - dejavuguides.com

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 - hover.com.

Then test this out. You can use something like this free online DNS service to make it easier to check https://www.whatsmydns.net/#NS/dejavuguides.com

Happy testing and set up!

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

Vu Long Tran

Written by Vu Long Tran

Solutions Engineer APAC. ex-@Forrester consultant. Writing on #cloud #howto guides and #tech tinkering!