Share via

How to force Windows 10 to use DNS?

Anonymous
2019-10-18T12:11:33+00:00

I have a Windows 10 PC from which I often access Linux systems in my home network with SSH.

This worked well in the past, but not anymore. Trying to access a particular Linux server via its name consistently fails. I can access it via its IP address.

After a bit of troubleshooting, I found that the PC doesn't use DNS to resolve domain names, but mDNS. The problematic Linux server doesn't respond to mDNS because it doesn't have the relevant service installed. Installing it would require installing a host of other software that I want to avoid. Instead, I want all my devices in the network to use the local DNS server.

Is there a way to tell Windows 10 not to use mDNS to resolve local names, but to use DNS instead?

Windows for home | Windows 10 | Internet and connectivity

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2019-10-19T14:45:57+00:00

    I found the answer in Superuser. To disable mDNS, I added a registry key:

    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient

    In this key, create a REG_DWORD named EnableMulticast and set it to 0. Then reboot. My PC now uses the DNS servers I configure.

    Later I found that this can also be achieved without rebooting by changing the group policy.

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2019-10-19T00:53:19+00:00

    Multicast DNS is a type of name resolution... and is not a "type" of DNS.   You do not "substitute" DNS for mDNS (or vice versa)

    Perhaps the simplest solution would be to add the Linux server to the Hosts file on the WIndows 10 PC.   The location of the hosts file is at C:\Windows\System32\Driver\Etc\Hosts

    https://www.groovypost.com/howto/edit-hosts-file-windows-10/

    My PC has a list of DNS servers but doesn't use them to resolve local names. It uses mDNS to resolve local names. It's OK if you don't want to call that behaviour "substitution", but the point is that I want my PC to use DNS to resolve local names.

    Adding the server to my hosts file is not a solution for me, since I don't want to maintain two or more redundant host lists in my network. It's easier though not very satisfying to give up on host name resolution and just use the IP address.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2019-10-19T00:47:24+00:00

    By default, Windows is configured to get its networking values via DHCP. It sends a broadcast packet on the net asking for a DHCP server to feed it the values. If you have a DHCP server on your network, it should answer and supply values for IP, DNS, gateway, and so on.

    I should have added that this Windows PC in question has its IP address and DNS servers configured statically. Just to ensure I do nothing wrong, I enabled DHCP on the network adapter in question. DHCP works, I get the correct IP address, gateway and list of DNS servers. However, my PC continues to use mDNS.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2019-10-18T14:18:45+00:00

    Is there a way to tell Windows 10 not to use mDNS to resolve local names, but to use DNS instead?

    Multicast DNS is a type of name resolution... and is not a "type" of DNS.   You do not "substitute" DNS for mDNS (or vice versa)

    Perhaps the simplest solution would be to add the Linux server to the Hosts file on the WIndows 10 PC.   The location of the hosts file is at C:\Windows\System32\Driver\Etc\Hosts

    https://www.groovypost.com/howto/edit-hosts-file-windows-10/

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  5. Brian Tillman 25,445 Reputation points Independent Advisor
    2019-10-18T13:39:41+00:00

    By default, Windows is configured to get its networking values via DHCP. It sends a broadcast packet on the net asking for a DHCP server to feed it the values. If you have a DHCP server on your network, it should answer and supply values for IP, DNS, gateway, and so on.

    Is your Windows PC connected to your Internet Service Provider's modem? If so, that's typically the gateway and DHCP server and it usually supplies the networking values, including DNS server. If your Linux machine is answering as a DHCP server, then, perhaps, it's supplying the (incorrect) value for DNS.

    You can force Windows to use a specific domain name service by altering the values in the TCP/IP protocol in the adapter. Here's an article describing how: https://support.microsoft.com/en-us/help/15089/.... I like to use 1.1.1.1 for my DNS server (Cloudflare's free DNS offering). Here's an article describing it: https://blog.cloudflare.com/announcing-1111/.

    Note that while Cloudflare is not Microsoft, it's a company that is well trusted in the industry and its web site won't contain anything you should worry about.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments