# Configuring DNS on Windows Server

DNS (Domain Name System) is a critical service that translates human-friendly domain names into IP addresses that computers use to identify each other on the network. Configuring DNS on Windows Server ensures that your network’s domain name resolution is handled efficiently and securely. This guide will walk you through the process of setting up and configuring DNS on Windows Server.

**<mark>DNS is essential for:</mark>**

* **Resolving domain names to IP addresses**: Enables users to access resources using domain names instead of IP addresses.
    
* **Managing DNS records**: Includes various types of records like A, AAAA, MX, CNAME, and more.
    

### Steps to Configure DNS on Windows Server

* **Create a forward lookup zone**: This is used to resolve domain names to IP addresses.
    
* **Create a reverse lookup zone**: This resolves IP addresses to domain names (optional but recommended).
    

**<mark>Step 1: Configure Forward Lookup Zone</mark>**

**Launch DNS Manager**: From Server Manager, go to **Tools** &gt; **DNS**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725781030561/5892e91d-c8d3-4771-a24d-4f2e3e1587a3.png align="center")

In DNS Manager, expand your server's name in the left-hand pane.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725781719109/80122b69-aed7-41a0-8fe4-b55b346f7bb5.png align="center")

Right-click on **Forward Lookup Zones** and select **New Zone**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725781771005/f9c20272-f2c2-4c5c-98c4-b08e2cc2db89.png align="center")

Click **Next** on the Welcome screen.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725781827277/ac8a3e45-d383-4ba6-abb6-940050612e22.png align="center")

Select **Primary Zone** (or Secondary/Stub if applicable), then click **Next**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725781893781/bff96078-c0ca-4614-8c86-517c1bfc6270.png align="center")

Choose where to store the zone data:

* **To all DNS servers running on domain controllers in this domain** (for Active Directory-integrated zones). &gt; Click **Next**.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725782015129/8e767807-68ba-46ca-b671-657a8f43faf5.png align="center")

Enter the domain name for your DNS zone (e.g., `dineshcloud.in`), and click **Next**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725787255840/59e6f726-7f2e-4641-a454-d9b58efd1572.png align="center")

* Choose one of the following options:
    
    * **Allow only secure dynamic updates** (for AD environments).
        
    * **Allow both nonsecure and secure dynamic updates**.
        
    * **Do not allow dynamic updates** (if manually managing records).
        
* Click **Next**.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725787649568/8ce05d54-7f98-484f-9d21-8fc8986ae2a2.png align="center")

Click **Finish** to complete the zone creation.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725787681480/c6608332-6323-4afd-9ede-a1248dd91c87.png align="center")

**<mark>Step 2: Create a Host (A) Record</mark>**

In the **Forward Lookup Zones**, expand your newly created zone (e.g., `dineshcloud.in`).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725789848736/9ebd01b2-acae-47d0-a622-1daaf01dc81a.png align="center")

Right-click the zone and select **New Host (A or AAAA)**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725789965740/91b25be2-1e91-41be-b8d5-2bd21f719b85.png align="center")

In the **Name** field, enter the host name (e.g., `www` for `www.dineshcloud.in`).

In the **IP address** field, enter the IP address of the host.

Check **Create associated pointer (PTR) record** if you want reverse DNS for this entry.

Click **Add Host** and then **OK**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725790087762/66b603d8-8637-4d1c-b106-f88bce2e773b.png align="center")

Restart the domain

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725790517512/0d89144c-b9e9-4390-8195-b5e65ceff1a9.png align="center")

**<mark>Step 3: Configure Reverse Lookup Zone</mark>**

Reverse Lookup Zones map IP addresses back to domain names.

* In DNS Manager, right-click on **Reverse Lookup Zones** and select **New Zone**.
    
* Follow the **New Zone Wizard** steps as with the forward lookup zone.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726299705757/e8d7ffc6-57a8-4834-a507-26194ff39c3d.png align="center")

* Choose **Primary zone** and click **Next**.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725787818962/acc9cc0d-5103-44e3-bcc9-466706a04af2.png align="center")

Choose where to store the zone data:

* **To all DNS servers running on domain controllers in this domain** (for Active Directory-integrated zones). &gt; Click **Next**.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725787878498/25d12fc6-2bd9-4746-93ff-45ddbd0e90fd.png align="center")

Select the IPV4 Reverse Lookup Zone &gt; Click Next

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725788029031/6d565fc8-3be9-4a46-8327-0e73376d83cb.png align="center")

Select the **Network ID** that matches your IP address range (e.g., `192.168.1` for a `192.168.1.0/24` network). &gt; Click **Next**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725788117803/df28afe8-340a-4a64-a5f0-38e31f6a4005.png align="center")

**Click Finish**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725788246895/56a4d19e-3ff6-47f2-92fa-73d09b22d774.png align="center")

#### **<mark>Step 4: Create a PTR Record</mark>**

In the **Reverse Lookup Zone**, right-click and select **New Pointer (PTR)**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726306324074/f58b4caf-01a4-4edb-b581-584c8bdad368.png align="center")

Enter the **IP Address** and corresponding **Host Name**. &gt; Click **OK** to create the PTR record.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726306246449/062ba2fd-60bc-41b8-a654-1e7fa132c929.png align="center")

**<mark>Step 5: Testing DNS Configuration</mark>**

To ensure your DNS configuration is working, you can use the **nslookup** command on the server or a client machine.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726301870255/7141dc30-dd06-4b57-b9b7-16e1bdbc9c2f.png align="center")

Open **Command Prompt &gt;** Type `nslookup dineshcloud.in` and press Enter. &gt; Verify that it returns the correct IP address.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726301272628/0e617c55-fc3c-4710-b470-3f2fe4f8bfc5.png align="center")

If the reverse lookup zone is configured, try querying the IP address:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726300513895/ade0d28e-8545-49fc-9ce2-7703f5498c85.png align="center")

**Check DNS Resolution:**

**Ping Domain Names**: Try pinging domain names from client computers to ensure they resolve correctly (e.g., `ping dineshcloud.in`).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726301817072/2d4bca64-d4a9-4172-a419-c086fefe3ff4.png align="center")

### **Conclusion**

Configuring DNS on Windows Server is a critical task for managing domain name resolution within your network. By following these steps, you can set up and manage DNS zones and records effectively, ensuring that users and applications can resolve domain names to IP addresses smoothly.
