# DNS configuration on the AD Controller

There are 2 scenarios for how to configure DNS in the AD environment:

##### 1. Configuration of the SafeDNS servers for each user via DHCP.

<p class="callout info">The user can not benefit from the faster DNS resolve – DNS cache using this configuration. We are not recommending using that option within the AD environment.</p>

Open Control Panel =&gt; Administrative Tools=&gt; DHCP

Configure the scope using the example below:

[![image-1721165235154.png](https://docs.safedns.com/uploads/images/gallery/2024-07/scaled-1680-/3XFjSbQlXFVID8Je-image-1721165235154.png)](https://docs.safedns.com/uploads/images/gallery/2024-07/3XFjSbQlXFVID8Je-image-1721165235154.png)

##### 2. Configuration of the local DNS server.

The role of the DNS server should be installed on the server and the DNS server should be configured using the following example:

Open Control Panel =&gt; Administrative Tools =&gt; DNS

On the DNS manager tap on the local server (our case is SERVER12) context menu =&gt; Properties

[![image-1721165249018.png](https://docs.safedns.com/uploads/images/gallery/2024-07/scaled-1680-/7JgWhKfGVp8pIy1h-image-1721165249018.png)](https://docs.safedns.com/uploads/images/gallery/2024-07/7JgWhKfGVp8pIy1h-image-1721165249018.png)

Tap the Edit Button:

[![image-1721165103211.png](https://docs.safedns.com/uploads/images/gallery/2024-07/scaled-1680-/sDeRc7Hkh1ae35e5-image-1721165103211.png)](https://docs.safedns.com/uploads/images/gallery/2024-07/sDeRc7Hkh1ae35e5-image-1721165103211.png)

Click on the area &lt;Click here to add an IP address or DNS Name&gt;

And enter SafeDNS DNS servers: **195.46.39.39** and **195.46.39.40**

[![image-1721165165466.png](https://docs.safedns.com/uploads/images/gallery/2024-07/scaled-1680-/uXGhHYkiBHBOTrVn-image-1721165165466.png)](https://docs.safedns.com/uploads/images/gallery/2024-07/uXGhHYkiBHBOTrVn-image-1721165165466.png)

Once finished, tap the OK button. The server’s icon should be green – meaning that the DNS connection to the server can be established.