DEV Community

Ankit Mathur
Ankit Mathur

Posted on

How to Install and Configure DNS Server on Windows Server 2016/2019/2022?

Efficient internet connectivity plays a central role in enhancing website performance, which is possible with the help of proper server configuration. The Domain Name System (DNS) is currently the primary backbone of the Internet which helps with efficient connection services.
This enables users to access websites and online applications easily.

Image description
To install and configure a DNS server, you need to learn about the basics of Domain Name System- what is DNS, and what are the prerequisites for DNS server installation. In this blog, let’s look at the basics, along with the step-by-step process of DNS server installation and configuration. This helps with smooth implementation across various platforms and client settings.

What is a Domain Name System (DNS)?

Domain Name System or DNS is part of the Internet and is an efficient, distributed database. It translates user-friendly domain names into IP addresses so that different types of computers and servers can find and communicate with each other across the Internet.

Proper DNS configuration helps ensure that websites, internet-based applications, and other relevant services are accessible and load quickly for all users. When DNS is inefficient or misconfigured, it can result in extended loading times, sluggish website performance, and complete unavailability. DNS configuration directly impacts a user’s experience when navigating the web.

What is a DNS Server?

A DNS server plays a key role in the DNS resolution process. This specialized computer server queries its database before returning the required IP address to the client. It specifically happens when a user enters a domain name into their web browser. This enables an efficient connection to the domain for better system functioning.

Your browser communicates with a network of root domain name servers when you enter a domain name, such as wwW .xyz. com. These servers act as reference books and provide the IP address associated with the same domain name. Then, the browser communicates directly with the hosting server using that IP address.

DNS helps translate user requests into IP addresses. Without DNS, you may have to memorize and enter long IP addresses when connecting to other websites rather than typing the website’s name.

DNS Hierarchy and Components

The DNS system usually operates in a hierarchical structure which includes several key components. These are very important to the correct functioning of networking systems.

•Root Servers: These servers hold information regarding top-level domains (TLDs) like .com, .org, and .net. They often remain at the top of the DNS hierarchy.
•Top-Level Domain (TLD) Servers: These servers manage TLDs like .com or .edu, which are often considered generic TLDs and country-code TLDs (ccTLDs).
•Authoritative DNS Servers: These servers provide specific domain names and authoritative answers to users for the same domains.
•Recursive DNS Servers: Third-party DNS providers and internet service providers (ISPs) operate these servers. They usually help resolve domain names on behalf of users and recursively query authoritative DNS servers until they get their IP addresses.

Prerequisites for DNS Server Installation

Before installing and configuring a DNS server, you must have the following information:

•Your domain name.
•The IP address and hostname of each server that you want to provide name resolution for.
You always need to verify that the following minimum conditions are proper before configuring your computer as a DNS:
•A Windows Server 2012R2, 2016, 2019, or 2022 operating system.
•An open Remote Desktop Protocol (RDP) 3389 port.
•A domain user with the required administrative privileges to configure the DNS.
•Minimum of 4 GB of RAM and a 2-core CPU.

Steps to Install and Configure a DNS Server

The process of installing and configuring a DNS server in Windows is very simple and straightforward. It enables you to configure and manage the same server for your network. It also involves adding the DNS server role to your Windows Server machine, creating and managing DNS records, and configuring basic DNS settings.

Make sure to sign in as an administrator user to the Windows Server and follow the steps below to install the DNS server. Please note that the same steps apply to the installation and configuration of DNS on Windows Server 2016/2019/2022.

Step 1: Prepare Your Server

You must change the name that was automatically given to your server when it was deployed. It is a good practice to make the server have a fixed IP address for at least one network connection before installing DNS into it.

Step 2: Add the DNS Role

Open Server Manager from the Manage menu once you’ve prepared your server. Then, select the option ‘Add Roles and Features.’ Make sure to read the introductory information on the screen and then click on Next.

Step 3: Select the Installation Type

You must select an installation type on the next screen, which comes with two options:
•Role-based or feature-based installation
•Remote desktop services installation

Select a Role-based or feature-based installation based on your requirements, and click on “Next”.

Step 4: Select the Server for Installing the DNS Role

Scroll down to find the DNS Server role on the “Select server roles” screen and click on it. A window will appear asking whether you want to ‘Add features required for DNS Server’. Tick the checkbox saying “Include management tools” (if applicable), and click on Add features. Then, click on “Next” again.

Step 5: Add the DNS Server Role and Other Relevant Management tools

You will get to see some information about the Domain Name System (DNS) on the next screen. Please note that this will just be for informative purposes, so click on “Next.” Now, you will be asked to confirm your choices. Review the information carefully and click on Install if everything is correct.

Step 6: Check for Multiple Installation Choices

The installation process shouldn’t take you too long, so click on the “install” option as soon as you see it. You may also choose to click on the “Close” option even before the process has finished. Conversely, if you want to return to the progress screen, you may find it again under the Notifications menu.

Step 7: Analyze the Progress of the DNS Role installation

You must restart the server for the changes to take effect once the installation process has finished. You will see a new section on the left-hand side of Server Manager and a new card in the middle of the screen once you’ve restarted.
To continue configuring your DNS service, click on the Tools menu and select the DNS option. Analyze if the DNS service is visible in the Server Manager.

Step 8: Configure Your DNS Server

You can easily configure the server after having installed the DNS server role. Right-click on the name of the server on the DNS Manager window, and select Configure a DNS Server. You will now be able to see the option that says ‘Configure a DNS Server Wizard’. Then, click on “next.”
The next window presents you with three different options:
•Create a forward lookup zone
•Create forward and reverse lookup zones
•Configure root hints only

For this tutorial, let’s select the first option, which says, “Create a forward lookup zone.” Then, click on “Next” again.

Step 9: Select the Configuration Action That Must be Carried Out

The next screen will ask you to select which DNS server will maintain your primary forward lookup zone:

•This server maintains the zone
•An ISP maintains the zone

For this tutorial, let’s select the option that says “this server maintains the zone” and click on the “Next” option.

On the next screen, you will be asked by the system to give a name to your DNS zone. Try to select something descriptive related to the organization or the use of the same server. Click on “next” again after you’ve entered the name. This enables you to give an identity to the specific DNS zone.

At this point, the wizard asks whether you want to create a new zone file or use an existing file copied from another server. For this tutorial, let’s select the option that says “create a new file with this file name”, use the default name suggested, and click on “next.”

Step 10: Choose the Name to be given to the DNS Zone File

The system will ask you to choose which dynamic updates to allow on the next screen. You will specifically find three options if you have an AD DS and only two if you don’t.

For this tutorial, let’s select the option Do not allow dynamic updates.” This means that all records will only be updated manually. Click on “next” once you have made your choice.

You can add forwarders on the next screen, which are the servers to which the DNS queries are sent in case the server can’t answer. The two options to choose from are:

•Yes, it should forward queries to DNS servers with the following IP addresses.
•No, It should not forward queries.

You will need to add an IP address for the forwarder if you choose the first option. You can add the forwarders if applicable. Then, you will need the final screen. Then, click on the “finish” option to save your changes and close the wizard.

Step 11: Check the Server Configuration

The final step for you is to check that the DNS server has been configured correctly. You can begin to create your DNS records manually after your server is successfully installed and configured.

Conclusion

A DNS server is a key aspect of technology infrastructure that shouldn’t be overlooked. Understanding and implementing proper DNS configuration is the key to ensuring efficient and secure internet connectivity. This also helps ensure the optimal performance of all internet-connected applications and services.

Individuals and organizations can navigate the digital world more efficiently and securely by following best practices and optimizing DNS server settings. Efficient DNS configuration can make a lot of difference in delivering a safer, faster, and more reliable online experience.
Need more assistance with DNS server installation and configuration?

Top comments (0)