How to host your own nameservers with glue records

If you run your DNS server on a static public IP address, your domain can be assigned nameservers in the same zone, giving your assigned nameservers the appearance of,, etc.

⚠️️  Note

Porkbun's DNS service cannot be used to DNS-host your domain with custom nameservers. It would be best if you operated your 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 IPv4 or address for each DNS server. 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. When you are done, click the "X" button at the upper right corner of the Domain Host Management window.
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 or AAAA 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 to comply with the DNS specification, which you'll want to do to ensure your domain resolves smoothly worldwide.

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

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