[Solved]- DNSHostNotFound: Failed to look up service “”: DNS name does not exist issue while connecting to MongoDb Atlas

When we try to connect MongoDB Atlas from our local computer we may face DNSHostNotFound: Failed to look up service “”: DNS name does not exist issue.

There could be many reasons but the most common one is, ISP (Internet Service Provider) uses DHCP (Dynamic Host Configuration Protocol) and it may block the Atlas address.

To solve this issue, we can change the DNS setting in our computer and use the public DNS server like Google.

Steps to fix DNSHostNotFound: Failed to look up service “”: DNS name does not exist issue in Windows 10

  1. Go to Control Panel
  2. Click Network and Internet
  3. Click Network and Sharing Center
  4. Click on Change adapter settings (You may see it in the left top)
  5. Select the connection you want to change the configuration and click on Properties
    • You may prompt for an administrative password.
  6. Go to the Networking tab and select Internet Protocol Version 4 (TCP/IPv4)
  7. Click Properties button.
  8. In the General tab, click on Use the following DNS server address:
  9. Add Preferred DNS server: 8.8.8.8.
  10. (Optional) Alternate DNS server: 8.8.4.4
  11. Click Ok
Setting custom DNS in windows

Done!

Now, when you try to connect to your Atlas cluster and it should be connected successfully and the issue DNSHostNotFound: Failed to look up service "": DNS name does not exist will be gone.

Thanks


Subscribe
Notify of
2 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments