Back to Tools

DNS Record Generator

Generate standard DNS records for any domain name with best-practice TTL values.

Mail Provider (MX)

BIND ZONE FORMAT / DNS RECORDS

How to Set Up BIND9 Nameserver

Setting up your own DNS nameserver with BIND9 (Berkeley Internet Name Domain) gives you full control over your domain's records. Follow these steps to implement the generated configuration on your Linux server.

1

Create the Zone File

Copy the generated output above and save it to a new file in your BIND zones directory. Conventionally, these are stored in /etc/bind/zones/.

# Create the directory if it doesn't exist
mkdir -p /etc/bind/zones
# Create the zone file
nano /etc/bind/zones/db.example.com
2

Register the Zone

Tell BIND to handle this domain by adding it to your named.conf.local file.

zone "example.com" {
    type master;
    file "/etc/bind/zones/db.example.com";
};
3

Validate and Reload

Before reloading, always check your syntax to prevent the DNS service from failing.

# Check global configuration
named-checkconf

# Check specific zone file
named-checkzone example.com /etc/bind/zones/db.example.com

# Reload BIND to apply changes
systemctl reload bind9

Pro Tip: Firewalls

Don't forget to open port 53 (both TCP and UDP) on your firewall. If you are using UFW, run: ufw allow 53/tcp and ufw allow 53/udp.