Hostwinds Tutorials
Search results for:
Table of Contents
Microsoft Windows Server 2016 is designed to handle many enterprise-level tasks, and one of the most important roles it can take on is running a Domain Name System (DNS) server. DNS acts like the internet's phonebook—it translates easy-to-remember domain names into the IP addresses that computers use to find each other. Whether you're setting up an internal network or managing public-facing domains, getting DNS right is a big step toward a reliable and responsive system.
This tutorial covers everything you need to install and configure DNS on Windows Server 2016. It includes both graphical and PowerShell methods, real-world applications, and practical guidance for beginners and experienced admins alike.
Windows Server 2016 includes several updates to DNS that make it more powerful and secure than in previous versions. If you're coming from an older server environment or just getting started, it's helpful to know what's new so you can decide which features to use. These enhancements give you more control over DNS behavior, improve protection against certain attacks, and make DNS administration easier—especially through automation.
Before jumping into the install process, take a moment to make sure your system is ready. DNS is a core piece of your network infrastructure, so it's worth setting things up properly from the start. That includes logging in with the right permissions, having a fixed IP address for consistency, and installing the latest updates so everything runs as expected.
To start using your Windows Server as a DNS server, you'll need to install the DNS Server role. This is the feature that adds DNS functionality to the system. You can do it through the graphical Server Manager or with a quick PowerShell command. Either method gets the job done—choose whichever you're more comfortable with.
If you prefer using the command line, PowerShell offers a faster way to install the DNS role:
Install-WindowsFeature -Name DNS -IncludeManagementTools
Once the DNS Server role is installed, you'll use DNS Manager to configure and manage DNS zones and records. This tool provides a graphical interface where you can easily see your server's DNS structure, make changes, and troubleshoot issues. It's the main hub for day-to-day DNS tasks on Windows Server.
There are a few ways to open DNS Manager—use whichever is most convenient:
Forward Lookup Zones are the most common DNS zones. They translate domain names (like example.com) into IP addresses so that devices know where to connect. If you're hosting any services or websites, this is the first type of zone you'll need.
Reverse Lookup Zones do the opposite of forward zones. Instead of resolving a name to an IP, they let you look up a hostname from an IP address. These zones are useful for tools like nslookup, logging, and some security applications.
Once zones are in place, you'll need to add records so your DNS server knows how to respond to queries. The most common types include A, PTR, and CNAME records. These map names to addresses, addresses to names, or one name to another.
Before calling it a day, it's smart to test your DNS setup to make sure everything resolves the way it should. You can do this with the nslookup command, which queries DNS records directly. It's a quick way to confirm your records are working.
nslookup example.com
nslookup 192.168.1.100
The results should reflect the records you created.
A working DNS server is great—but a secure and reliable one is even better. These best practices help you avoid problems down the line. They cover basics like redundancy and logging, plus security features like DNSSEC and recursion control.
PowerShell isn't just for installation—you can use it to manage DNS zones, records, and settings. If you're working in larger environments or want to automate repetitive tasks, these commands come in handy.
Add-DnsServerPrimaryZone -Name "example.com" -ZoneFile "example.com.dns"
Add-DnsServerConditionalForwarderZone -Name "externaldomain.com" -MasterServers "8.8.8.8"
Setting up DNS is just the beginning. To keep things running reliably, your server will need occasional maintenance. This includes removing stale records, reviewing settings, and keeping an eye on performance. Staying on top of updates is important too, especially as support deadlines approach.
Even with everything set up correctly, DNS problems can still happen. These issues might show up as slow lookups, failed name resolutions, or unexpected behavior on your network. When that happens, here are a few steps you can take to identify and fix the issue:
Start with the basics. Make sure your zone names, hostnames, and IP addresses are correct. A single typo in a record or an incorrectly named zone file can prevent DNS from working as expected.
Sometimes a service just needs a fresh start. You can restart the DNS Server service from the Services console (services.msc) or by running the following in PowerShell:
Restart-Service -Name DNS
Use nslookup to test both forward and reverse lookups. This can help confirm whether the issue is related to DNS or something else in your network:
nslookup example.com
nslookup 192.168.1.100
The Event Viewer often contains useful error messages that can point you in the right direction. Look under Windows Logs > System and Applications and Services Logs > DNS Server.
If DNS queries are timing out or failing to reach your server, make sure your firewall isn't blocking UDP/TCP port 53. You may need to allow these through Windows Firewall or any other firewall on the network.
If you're still not getting results, take a look at DNS Server Not Responding: 8 Fixes for PC/Mac. While it's focused on client-side troubleshooting, it covers many of the common root causes that can also affect servers—like network settings, adapter issues, or bad DNS caching.
Written by Hostwinds Team / November 15, 2018