Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
VGSources
Blog

How to Configure BIND as an Authoritative DNS Server on Ubuntu

A complete Ubuntu BIND9 guide covering authoritative forward and reverse zones, SOA serials, validation, delegation, secondary servers, DNSSEC, and troubleshooting.
Length11 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Ubuntu’s BIND9 package, define your zones in /etc/bind/named.conf.local, create correctly serialised forward and reverse zone files, validate them with named-checkconf and named-checkzone, then query the server with dig. A local BIND configuration makes the server authoritative on the network, but public Internet answers also require correct delegation at the parent zone or registrar.

What an authoritative BIND server does

An authoritative DNS server is the source of truth for one or more zones. A primary (also called master) BIND server reads each zone from a local file and answers with the records published in that file. It is different from a recursive resolver: a resolver looks up answers on behalf of clients, while an authoritative server serves data for zones it controls.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This guide uses BIND9 on Ubuntu and a documentation domain, example.com, with documentation-only addresses from the TEST-NET ranges. Replace every example name and address before deploying. The same configuration pattern applies to a public domain, an internal zone, or a game-server network, but the delegation and access requirements differ.

Prerequisites and deployment decisions

  • An Ubuntu system with administrative access and a stable address. The examples use 192.0.2.10 for the nameserver and 192.0.2.20 for a host; these addresses are reserved for documentation and must not be used on the Internet.
  • A domain or reverse-address zone that you are authorised to administer. For a public domain, the registrar or parent zone must delegate the domain to the nameserver addresses you operate.
  • At least one planned nameserver name, such as ns.example.com., and the address records needed by clients.
  • A decision about recursion. An Internet-facing authoritative-only server should not be an open recursive resolver. Review /etc/bind/named.conf.options and set recursion and client access controls for the deployment.
  • A backup or secondary-server plan. One primary can answer queries, but it is a single point of failure if the host or its network disappears.

For a private network, clients may be configured to query the server directly and no public delegation is needed. For a public service, local configuration alone cannot make the domain reachable; the parent zone must publish the delegation, and a nameserver inside the delegated domain may also require glue at the registrar.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Install BIND9 and understand Ubuntu’s configuration layout

  1. Install the package:
sudo apt install bind9

Ubuntu’s packaged configuration is under /etc/bind. The main operational configuration is named.conf, which includes other files supplied by the package. Put locally defined authoritative zones in /etc/bind/named.conf.local; keeping local declarations there avoids mixing them with package-managed defaults.

BIND statements have scopes. Global settings belong in an options statement, while a zone statement applies only to one zone. A zone-specific setting is narrower than a global setting and overrides the broader setting where the two conflict. This lets you keep common behaviour in named.conf.options and apply exceptions to one zone without changing every zone.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before adding zones, review the options file. In particular, decide whether recursion is enabled, which clients may query the server, and which interfaces should listen. An authoritative-only Internet service normally limits recursion and avoids accepting recursive queries from untrusted networks.

Declare a forward zone

A forward zone maps names such as www.example.com to addresses. Add a zone declaration to /etc/bind/named.conf.local:

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

type master identifies this server as the primary source for the zone. The file path is where BIND reads the zone data. The filename is a local convention; the important part is that it matches the path in the declaration and is readable by the BIND service.

Build the forward zone file

Create /etc/bind/db.example.com with a time-to-live, an SOA record, an NS record, and the address records clients need:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
$TTL 604800
@   IN  SOA ns.example.com. root.example.com. (
        1       ; Serial
        604800  ; Refresh
        86400   ; Retry
        2419200 ; Expire
        604800  ; Negative Cache TTL
)
@   IN  NS  ns.example.com.
ns  IN  A   192.0.2.10
www IN  A   192.0.2.20

How to read the records

  • $TTL 604800 sets the default cache lifetime in seconds for records that do not specify another TTL.
  • The SOA record names the primary server (ns.example.com.) and the responsible mailbox in DNS form (root.example.com., where the first dot represents the usual mailbox separator).
  • Serial is the zone version. Increment it on every edit. Secondaries use the changed serial to decide whether to transfer new data.
  • Refresh, Retry, and Expire control secondary-server polling and how long a secondary may continue serving data when it cannot contact the primary.
  • Negative Cache TTL controls how long resolvers may cache a negative response such as a name that does not exist.
  • The apex NS record delegates example.com to ns.example.com.. The trailing dot is significant: it makes the name fully qualified instead of causing BIND to append the zone name again.
  • The A records map the nameserver and web host to IPv4 addresses. Add the record types your services actually use, such as additional A or AAAA records.

Use a fully qualified name with a trailing dot in SOA and NS values. A missing dot can produce an unintended name such as ns.example.com.example.com.. Keep the serial consistent with your change process; a serial that does not increase leaves secondaries serving old data even when the file has changed.

Add a reverse DNS zone

Reverse DNS maps an address back to a hostname through a PTR record. IPv4 reverse zones use the in-addr.arpa namespace and reverse the address octets in the zone name. For addresses in 192.168.1.0/24, declare:

zone "1.168.192.in-addr.arpa" {
    type master;
    file "/etc/bind/db.192";
};

Create the referenced file, for example /etc/bind/db.192, and add an SOA plus PTR records whose owner names are the remaining, unreversed octets:

$TTL 604800
@   IN  SOA ns.example.com. root.example.com. (
        1       ; Serial
        604800  ; Refresh
        86400   ; Retry
        2419200 ; Expire
        604800  ; Negative Cache TTL
)
@   IN  NS  ns.example.com.
10  IN  PTR ns.example.com.
20  IN  PTR www.example.com.

In this example, the owner 20 under 1.168.192.in-addr.arpa represents 192.168.1.20. Reverse delegation is controlled by the organisation that owns the address block. For a private address range, configure the internal DNS clients and network infrastructure; for a public block, the upstream provider must delegate the reverse zone to your nameserver.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Validate configuration before restarting BIND

Check the global configuration and each zone before activating changes. Validation catches syntax errors without interrupting a running service:

sudo named-checkconf
sudo named-checkzone example.com /etc/bind/db.example.com
sudo named-checkzone 1.168.192.in-addr.arpa /etc/bind/db.192

named-checkconf reports errors in the BIND configuration files. named-checkzone parses one zone file against the zone name you provide. A successful check includes the loaded serial and OK. Treat warnings seriously when they concern missing names, malformed owner names, or unexpected record data; a syntactically valid file can still publish the wrong answer.

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Run the checks again after changing a zone or its declaration. Checking only the forward zone does not validate a newly added reverse zone, and checking a file with the wrong zone name can hide an error in the intended declaration.

Restart the service and inspect its status

Once every check succeeds, restart the packaged service and inspect the result:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo systemctl restart bind9.service
sudo systemctl status bind9.service

A failed restart usually points to a configuration or file-permission problem. Read the status output and the service journal, correct the reported file or statement, run the validation commands again, and restart only after they pass. Keeping validation before every restart prevents a typo from turning a planned DNS edit into an outage.

Test authoritative answers with dig

Query the server directly rather than relying on a recursive resolver that may have cached an older answer:

dig @192.0.2.10 example.com SOA
dig @192.0.2.10 www.example.com A +norecurse
dig @192.0.2.10 -x 192.0.2.20
  • The SOA query confirms that the server has loaded the zone and exposes the current serial.
  • The direct A query asks for the host record without requesting recursion. In the response flags, aa means the answer is authoritative for the name.
  • The -x query performs the reverse lookup and should return the corresponding PTR value when the reverse zone is configured and delegated to this server.

Check both the answer section and the authority flags. An answer returned without aa may have come from recursion or cache and does not prove that this BIND instance is authoritative. Query the server’s actual listening address, not a different resolver on the same network.

Make public delegation match your server

For a public domain, configure the parent zone or registrar to delegate the domain to the nameserver names published in your zone. The parent must also know the addresses of those nameservers. If a nameserver name is inside the domain it serves, the registrar may need glue records so resolvers can find its address without a circular lookup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

After delegation changes, use direct queries to your server to separate local BIND problems from parent-zone problems. If direct queries show an authoritative answer but public resolvers do not, inspect the parent delegation, nameserver addresses, firewall rules, and propagation or caching at the querying resolver. A correct zone file cannot override a missing or incorrect parent delegation.

Add a secondary server for availability

A single primary is simple but fails whenever its host, storage, network path, or service fails. Ubuntu recommends a secondary server that obtains the zone from the primary. On the primary, restrict transfers to the secondary’s address in each zone declaration:

zone "example.com" {
    type master;
    file "/etc/bind/db.example.com";
    allow-transfer { SECONDARY_IP; };
};

Replace SECONDARY_IP with the secondary’s real address, apply the same transfer restriction to every authoritative zone, and restart BIND after validation. Configure the secondary as a slave that loads the zone from the primary. Do not permit unrestricted transfers: a zone transfer can disclose the complete set of names and addresses in a zone.

Design Availability during primary failure Transfer and access control Operational complexity DNSSEC and key-management impact
One primary No alternate source; queries fail if the only server is unreachable. No inter-server transfer policy is required, but query access still needs appropriate controls. Lowest; one host and one set of zone files. Keys and signing are managed on one system.
Primary plus secondary Secondary can continue answering while the primary is unavailable, subject to its cached zone lifetime. Transfers should be limited with allow-transfer to the secondary address. Higher; monitor transfers, serials, connectivity, and both services. Plan where signing occurs and how keys and signed data reach the secondary.

Adding reverse zones improves address-to-name diagnostics, while adding a secondary improves resilience. A forward-only primary is the smallest configuration; each additional zone and server increases the number of files and checks you must maintain.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Plan DNSSEC after basic authority works

DNSSEC is a follow-on hardening step, not a substitute for correct zone data and delegation. Ubuntu defines it as “a set of security extensions to DNS which allow DNS data to be verified for authenticity and integrity.” Signing adds records such as DNSKEY, RRSIG, and a parent-published DS record.

Start with an existing authoritative zone that already validates and answers correctly. Ubuntu’s DNSSEC procedure uses a writable directory such as /var/lib/bind for signed-zone operation. This matters because the signing process must create or update generated records without modifying a read-only package area. Plan file ownership, permissions, key backups, rollover procedures, and how the parent receives the DS record before enabling validation for users.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

DNSSEC key management adds operational work to both single-server and primary-plus-secondary designs. Decide which system signs, where private keys are stored, how signed files are transferred, and how you will recover from a lost or expired key. Do not publish a DS record at the parent until the corresponding DNSKEY and signatures are being served consistently.

Troubleshoot the common failure modes

“The service will not restart”

Run sudo named-checkconf first, then check every zone with named-checkzone. Look for missing braces or semicolons in named.conf.local, an incorrect zone-file path, and a zone file whose owner name or SOA syntax is malformed. Correct the first reported error, validate again, and only then restart.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“The query returns no answer”

Confirm that the queried name is actually present in the zone file, that its record uses the intended owner name, and that the SOA serial reflects the latest edit. Query the server directly with dig @SERVER_IP name TYPE +norecurse so a recursive cache cannot obscure the result.

“The answer is not authoritative”

Ensure the query is sent to the BIND address that loaded the zone and inspect the response for the aa flag. If the flag is absent, you may be querying a resolver, a different local service, or a server that has not loaded the zone declaration. Check service status and the SOA response from the target address.

“A secondary has stale data”

Increase the SOA serial after every edit, verify that allow-transfer includes the secondary’s address, and confirm that network controls permit DNS zone transfers between the two servers. The secondary compares serials; leaving the serial unchanged tells it that no new version exists.

“Direct tests work but public lookups fail”

Inspect parent delegation and nameserver address records. Verify that each delegated nameserver is reachable on the required DNS transport, that glue exists when a nameserver is inside the delegated domain, and that the parent has the current addresses. This is a delegation problem rather than a zone-file parsing problem when direct authoritative queries succeed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“Reverse lookup is wrong”

Recheck the reversed octets in the in-addr.arpa zone name and the PTR owner. For a /24 network, only the final address octet appears as the owner beneath the three reversed network octets. Confirm that the reverse zone is delegated by the address-space owner when the addresses are public.

Operational checklist

  • Keep local zone declarations in /etc/bind/named.conf.local and zone data in the paths referenced by those declarations.
  • Use fully qualified names with trailing dots in SOA and NS records.
  • Increment every zone’s SOA serial whenever its data changes.
  • Run named-checkconf and named-checkzone for all affected zones before restarting.
  • Inspect systemctl status bind9.service after activation.
  • Test SOA, forward, and reverse answers directly with dig, and confirm the authoritative aa flag.
  • Keep recursion and client access controls appropriate to the network; never expose an unintended open recursive resolver.
  • Restrict zone transfers to known secondary addresses with allow-transfer.
  • Maintain parent and reverse delegations separately from local BIND files.
  • Treat DNSSEC as a planned key-management project using writable signed-zone storage such as /var/lib/bind, rather than enabling it before unsigned authority is reliable.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.