> ## Documentation Index
> Fetch the complete documentation index at: https://e-gurl.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Resetting DNS

> How to restore your DNS settings to default

# Resetting DNS

DNS-MNS can restore your DNS settings to automatic (DHCP) mode, where your router or ISP provides DNS servers.

## Using DNS-MNS to Reset

The easiest way to reset DNS is through the tool itself:

1. Run `dns-mns`
2. Select option `3` (Clear/Reset DNS)
3. Confirm the reset

```
[ CLEAR/RESET DNS ]

This will reset your DNS settings to automatic (DHCP).
Your router/ISP will provide DNS servers.

Are you sure? (y/n): y

Resetting DNS settings...
DNS has been reset to automatic.
```

## What Reset Does

<Tabs>
  <Tab title="Linux">
    **systemd-resolved:**

    * Removes `/etc/systemd/resolved.conf.d/dns-mns.conf`
    * Restarts systemd-resolved service

    **NetworkManager:**

    * Resets `ipv4.ignore-auto-dns` to `no`
    * Clears custom DNS settings
    * Reloads the connection

    **resolv.conf:**

    * Restores from backup if available
    * Or configures for DHCP
  </Tab>

  <Tab title="macOS">
    * Clears custom DNS using `networksetup -setdnsservers "Wi-Fi" empty`
    * Flushes DNS cache
    * System returns to DHCP-provided DNS
  </Tab>

  <Tab title="Windows">
    * Resets DNS using `Set-DnsClientServerAddress -ResetServerAddresses`
    * Clears DNS cache
    * System returns to DHCP-provided DNS
  </Tab>
</Tabs>

## Manual Reset

If DNS-MNS isn't available, you can reset manually:

<Tabs>
  <Tab title="Linux">
    **systemd-resolved:**

    ```bash theme={null}
    sudo rm /etc/systemd/resolved.conf.d/dns-mns.conf
    sudo systemctl restart systemd-resolved
    ```

    **NetworkManager:**

    ```bash theme={null}
    # Get your connection name
    nmcli connection show

    # Reset DNS
    sudo nmcli connection modify "Your Connection" ipv4.dns ""
    sudo nmcli connection modify "Your Connection" ipv4.ignore-auto-dns no
    sudo nmcli connection up "Your Connection"
    ```

    **resolv.conf:**

    ```bash theme={null}
    # If you have a backup
    sudo cp /etc/resolv.conf.backup /etc/resolv.conf

    # Or let DHCP handle it
    sudo dhclient -r && sudo dhclient
    ```
  </Tab>

  <Tab title="macOS">
    ```bash theme={null}
    # Reset to empty (DHCP)
    sudo networksetup -setdnsservers "Wi-Fi" empty

    # Flush cache
    sudo dscacheutil -flushcache
    sudo killall -HUP mDNSResponder
    ```

    For Ethernet:

    ```bash theme={null}
    sudo networksetup -setdnsservers "Ethernet" empty
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    # Reset to DHCP
    Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ResetServerAddresses

    # Clear cache
    Clear-DnsClientCache
    ```

    For Ethernet:

    ```powershell theme={null}
    Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ResetServerAddresses
    ```
  </Tab>
</Tabs>

## Flushing DNS Cache

After resetting DNS, it's a good idea to flush your DNS cache:

<Tabs>
  <Tab title="Linux">
    ```bash theme={null}
    sudo resolvectl flush-caches
    ```
  </Tab>

  <Tab title="macOS">
    ```bash theme={null}
    sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    Clear-DnsClientCache
    ```

    Or in Command Prompt:

    ```cmd theme={null}
    ipconfig /flushdns
    ```
  </Tab>
</Tabs>

## Verifying Reset

Confirm that DNS has been reset to automatic:

<Tabs>
  <Tab title="Linux">
    ```bash theme={null}
    resolvectl status
    ```

    Look for "DNS Servers" from your router's IP range (e.g., 192.168.x.x).
  </Tab>

  <Tab title="macOS">
    ```bash theme={null}
    networksetup -getdnsservers Wi-Fi
    ```

    Should show: "There aren't any DNS Servers set on Wi-Fi."
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    Get-DnsClientServerAddress -InterfaceAlias "Wi-Fi"
    ```

    Should show DNS from your router.
  </Tab>
</Tabs>

## When to Reset DNS

Consider resetting DNS if:

* You're experiencing connectivity issues
* Websites aren't loading correctly
* You want to return to your ISP's default DNS
* You're troubleshooting network problems

<Note>
  After resetting, your ISP-provided DNS will be used. This may be slower or have restrictions depending on your provider.
</Note>
