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.
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 to your DNS server.
How to create glue records
- Log in. You should arrive at the Domain Management screen. If you're already logged in, click on ACCOUNT in the top-right corner and select Domain Management.
- 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.
- 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 assignments.
- Click Submit. Click the "X" button at the upper right corner of the Domain Host Management window when you are done.
- Click the Manage link next to Authoritative Nameservers.
- 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 answer with the same IP address 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.