How to host your own nameservers with GLUE records

If you run your own DNS server on a static public IP address, it is possible for your domain to be assigned nameservers in the same zone, giving your assigned nameservers the appearance of ns1.mycustomdomain.com, ns2.mycustomdomain.com, etc.

⚠️️  Note

Porkbun's DNS service cannot be used to DNS-host your domain with custom nameservers. You must operate your own DNS server(s) to assign custom nameservers of the same domain while remaining in compliance with the DNS specification.

You will first need to install records at the registry specifying the IP address of your nameservers, known as glue records. You'll also need to add matching A and NS records at your DNS server.

How to create glue records

1
Login to your Porkbun account.
2
From the Domain Management page, click the Details button for the domain you would like to create glue records for and click the Manage link next to glue records.

3
Specify the hostname and IP address for each of your DNS servers. Even if you only have one IP address or DNS server, you must still add at least two records (ns1 and ns2) that answer the same IP address as this will be required for future assignment. Click Submit. Click the "X" button at the upper right corner of the Domain Host Management window when you are done.

4
Click the Manage link next to Authoritative Nameservers.

5
Enter the hostnames of the nameservers you created in the glue records area and click Submit.

Additional configuration steps

That's it on the Porkbun side. Now, in your DNS server, in the zone configuration for this domain, you'll need to add matching A records for ns1, ns2, etc. that have the same answer as the glue records you created above. You'll also want to make the NS records served from your DNS server match your assigned custom nameserver names. These last two steps are necessary for compliance with the DNS specification, which you'll want to do to make sure your domain resolves smoothly worldwide.

Your domain should now be able to resolve using nameservers in its own zone.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.