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.

2
From the Domain Management page, click the Details button for the domain you would like to create glue records for, then click the "Manage" link below "Glue Records".

3
The "Domain Host Management" menu will appear where you can create your glue records. Please note that even if you only have one IP address or DNS server, you must still add at least two glue records (such as ns1 and ns2) that resolve to your IP/server, as this is a requirement in the DNS specification.

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.

After creating your glue records, close out of the menu by clicking the "X" at the top right corner.

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.

4
You should still see the details menu for your domain. Click the edit icon next to the "Nameservers" option.

5
Remove any nameservers currently applied to the domain so the field is empty. Enter the host names of the nameservers you created in the previous steps, then click "Submit".

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!

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