Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install the DNS Server Role on Windows Server 2019

This guide shows you how to install the DNS Server role on Windows Server 2019 and make your first zone.

Windows Hosting2 min read23 steps13 screenshots

What is a DNS server?

DNS is like a phone book for the internet. It turns a name like example.com into a number, called an IP address. A DNS server is a computer that holds that phone book and answers questions. A zone is one page of the book. It holds all records for one domain. You need admin rights on the server. The server should have a fixed IP address.

Note: Windows Server 2019 is an older version. Newer versions follow nearly the same steps.

Part 1: Install the role

  1. Open Server Manager.
  2. Click Manage, then Add Roles and Features.
    Screenshot: Click Manage , then Add Roles and Features .
  3. Click Next on the first page.
  4. Choose Role-based or feature-based installation and click Next.
    Screenshot: Choose Role-based or feature-based installation and click Next .
    Screenshot: Choose Role-based or feature-based installation and click Next .
  5. Select your server and click Next.
    Screenshot: Select your server and click Next .
  6. Tick DNS Server.
    Screenshot: Tick DNS Server .
    Screenshot: Tick DNS Server .
    Screenshot: Tick DNS Server .
  7. Click Add Features in the pop-up box.
    Screenshot: Click Add Features in the pop-up box.
  8. Click Next until the Confirmation page.
  9. Click Install.
  10. Click Close when it is done.

You can also use PowerShell, a command window with extra tools:

Install-WindowsFeature DNS -IncludeManagementTools

This command installs the DNS role and its management tool.

Part 2: Create a forward lookup zone

A forward lookup zone turns names into IP addresses.

  1. In Server Manager, click Tools, then DNS.
    Screenshot: In Server Manager, click Tools , then DNS .
  2. Expand your server name in the left panel.
  3. Right-click Forward Lookup Zones and choose New Zone.
  4. Click Next on the welcome page.
  5. Choose Primary zone and click Next.
  6. Type your domain name, for example example.com, and click Next.
  7. Choose Create a new file and click Next.
  8. Choose Do not allow dynamic updates unless you know you need them, and click Next.
  9. Click Finish.

Part 3: Add a record

  1. Right-click your new zone and choose New Host (A or AAAA).
    Screenshot: Right-click your new zone and choose New Host (A or AAAA) .
  2. Type the name, for example www.
  3. Type the IP address.
  4. Click Add Host, then Done.

Part 4: Allow DNS through the firewall

DNS uses port 53. A port is a numbered door on the server. The DNS role usually opens it for you. Check Windows Defender Firewall if outside computers cannot reach it.

Part 5: Test it

nslookup www.example.com 127.0.0.1

This asks your own server for the address of www.example.com. You should see the IP you added.

Screenshot: This asks your own server for the address of www.example.com. You should see the IP you ad
Warning: For a public domain, the registrar must point its nameservers to your DNS server. Ask Hostvento support before changing nameservers, or your site and email may stop working.

Quick recap

  • A DNS server answers name-to-number questions.
    Screenshot: A DNS server answers name-to-number questions.
    Screenshot: A DNS server answers name-to-number questions.
  • Install the role in Add Roles and Features.
  • Create a zone and add records in the DNS tool.
  • Test with nslookup.