Hostwinds Tutorials

Search results for:


Table of Contents


DNS Features Introduced in Windows Server 2016
System Requirements and Preparation
Step 1: Install the DNS Server Role
Option A: Using Server Manager
Option B: Using PowerShell
Step 2: Open DNS Manager
Option A: From Server Manager
Option B: From the Start Menu
Option C: Using the Run Dialog
Once you have DNS Manager open:
Step 3: Create a Forward Lookup Zone
Step 4: Create a Reverse Lookup Zone
Step 5: Add DNS Records
A Record (Host)
PTR Record (Reverse)
CNAME Record (Alias)
Step 6: Verify DNS Configuration
DNS Best Practices and Tips
PowerShell for DNS Automation
Create a Primary Zone
Add a Conditional Forwarder
Maintaining Your DNS Server
Troubleshooting Common DNS Issues
Check for typos and missing records
Restart the DNS Server service
Test with nslookup
Check event logs
Review firewall settings
Look into common DNS connection problems

How Configure DNS Server on Windows

Tags: DNS,  Windows 

DNS Features Introduced in Windows Server 2016
System Requirements and Preparation
Step 1: Install the DNS Server Role
Option A: Using Server Manager
Option B: Using PowerShell
Step 2: Open DNS Manager
Option A: From Server Manager
Option B: From the Start Menu
Option C: Using the Run Dialog
Once you have DNS Manager open:
Step 3: Create a Forward Lookup Zone
Step 4: Create a Reverse Lookup Zone
Step 5: Add DNS Records
A Record (Host)
PTR Record (Reverse)
CNAME Record (Alias)
Step 6: Verify DNS Configuration
DNS Best Practices and Tips
PowerShell for DNS Automation
Create a Primary Zone
Add a Conditional Forwarder
Maintaining Your DNS Server
Troubleshooting Common DNS Issues
Check for typos and missing records
Restart the DNS Server service
Test with nslookup
Check event logs
Review firewall settings
Look into common DNS connection problems

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.

DNS Features Introduced in Windows Server 2016

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.

  • Group Policy for NRPT: Manage Name Resolution Policy Table settings via Group Policy, without tying them to a specific interface.
  • DNS Policies: Control how DNS responds based on criteria like client IP, time of day, or query type.
  • Response Rate Limiting (RRL): Mitigates DNS-based denial of service attacks.
  • DANE (DNS-based Authentication of Named Entities): Strengthens security with DNSSEC and TLSA records.
  • Support for Unknown Record Types: Makes it easier to use nonstandard or custom DNS records.
  • IPv6 Root Hints: Simplifies IPv6 integration.
  • Improved PowerShell Support: Full scripting support for DNS administration.

System Requirements and Preparation

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.

  • Log into your Windows Server 2016 system via console or Remote Desktop.
  • Use an account with Administrator privileges.
  • Assign a static IP address to the server.
  • Apply all current Windows updates.

Step 1: Install the DNS Server Role

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.

Option A: Using Server Manager

  1. Open Server Manager from the taskbar or Start menu.
  2. Click Manage > Add Roles and Features.
  3. Click Next on the "Before You Begin" screen.
  4. Select Role-based or feature-based installation, then click Next.
  5. Choose your server from the list, then click Next.
  6. In Server Roles, check DNS Server.
  7. When prompted, click Add Features.
  8. Click Next through the Features screen.
  9. Review your choices and click Install.
  10. Wait for installation to finish. A reboot may be required.

Option B: Using PowerShell

If you prefer using the command line, PowerShell offers a faster way to install the DNS role:

Install-WindowsFeature -Name DNS -IncludeManagementTools

Step 2: Open DNS Manager

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:

Option A: From Server Manager

  1. Click the Start button and launch Server Manager.
  2. In the upper-right corner, click Tools, then select DNS from the dropdown list.
  3. DNS Manager will open in a new window, displaying your server name in the left-hand pane.

Option B: From the Start Menu

  1. Click the Start button or press the Windows key.
  2. Type 'DNS' into the search bar.
  3. Click on DNS (it should appear as "DNS Manager") to open the tool directly.

Option C: Using the Run Dialog

  1. Press Windows key + R to open the Run box.
  2. Type 'dnsmgmt.msc' and press Enter.
  3. DNS Manager will launch immediately.

Once you have DNS Manager open:

  • Expand your server's node in the left pane.
  • From here, you'll be able to view Forward Lookup Zones, Reverse Lookup Zones, and other configuration options.
  • Right-click the server name to access tasks like clearing the cache, creating new zones, setting aging/scavenging settings, and accessing properties.

Step 3: Create a Forward Lookup Zone

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.

  1. In DNS Manager, expand your server node.
  2. Right-click Forward Lookup Zones > New Zone.
  3. Select Primary Zone.
  4. Choose to store the zone in Active Directory if applicable.
  5. Enter the zone name (e.g., example.com).
  6. Accept or adjust the zone file name.
  7. Set dynamic update preferences:
    • Allow only secure dynamic updates (recommended for Active Directory).
    • Do not allow dynamic updates for static setups.
  8. Complete the wizard.

Step 4: Create a Reverse Lookup Zone

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.

  1. Right-click Reverse Lookup Zones > New Zone.
  2. Choose Primary Zone.
  3. Select IPv4 or IPv6.
  4. Enter the Network ID (e.g., 192.168.1 for a /24 subnet).
  5. Accept or change the zone file name.
  6. Set your dynamic update preferences.
  7. Finish the wizard.

Step 5: Add DNS Records

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.

A Record (Host)

  1. Right-click your forward lookup zone > New Host (A or AAAA).
  2. Enter the hostname (e.g., www) and IP address.
  3. Check Create associated PTR record for reverse DNS.

PTR Record (Reverse)

  • Created automatically if you checked the box above.
  • Or manually added in the reverse zone.

CNAME Record (Alias)

  1. Right-click the zone > New Alias (CNAME).
  2. Use this to point one name to another (e.g., ftp.example.com → www.example.com).

Step 6: Verify DNS Configuration

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.

DNS Best Practices and Tips

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.

  • Use two or more DNS servers to provide redundancy.
  • Assign static IP addresses to all DNS servers.
  • Turn on DNS logging:
    • Right-click your server in DNS Manager > Properties > Debug Logging.
    • Check logs in Event Viewer for DNS-related events.
  • Secure your zones:
    • Enable DNSSEC.
    • Restrict zone transfers.
    • Limit recursion to internal IPs.

PowerShell for DNS Automation

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.

Create a Primary Zone

Add-DnsServerPrimaryZone -Name "example.com" -ZoneFile "example.com.dns"

Add a Conditional Forwarder

Add-DnsServerConditionalForwarderZone -Name "externaldomain.com" -MasterServers "8.8.8.8"

Maintaining Your DNS Server

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.

  • Enable scavenging to clean up old records:
    • Right-click server > Set Aging/Scavenging.
  • Monitor TTL settings to manage caching.
  • Review your zone files regularly.
  • Start planning upgrades—Windows Server 2016 support ends in January 2027.

Troubleshooting Common DNS Issues

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:

Check for typos and missing records

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.

Restart the DNS Server service

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

Test with nslookup

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

Check event logs

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.

Review firewall settings

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.

Look into common DNS connection problems

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