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 ns1.mycustomdomain.com, ns2.mycustomdomain.com, etc.
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. Let's get started!
How to create glue records
- 1
- 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.
Specify the host name and IP address for each of your glue records. You can use IPv4 or IPv6 addresses. After entering the info for each record, click "Submit" to finish creating them.
Note
Porkbun's DNS service cannot be used to host the DNS on your domain with custom nameservers. You'll need to operate your own DNS server(s) in order to assign custom nameservers for your domain, while remaining in compliance with the DNS specification.
That's it on the Porkbun side! Now you'll need to make sure the DNS server/IP that you pointed your glue records to is configured to respond for your domain.
Additional configuration steps
Instructions vary for this portion, depending on the server you're using to resolve DNS on your domain. In the DNS zone configuration for your domain, you will need to add matching A records (for IPv4 addresses) and AAAA records (for IPv6 addresses) that match the same host name (ns1, ns2, etc.) and IP addresses you specified when creating your glue records.
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.
After configuring your DNS server to match the glue records you created on Porkbun, your domain should now be able to resolve using custom nameservers in its DNS zone. Good work out there!