How to connect a laptop to Wi-Fi via DNS: a complete guide with troubleshooting steps

Connecting a laptop to Wi-Fi via settings DNS servers — is one of the effective ways to solve problems with slow internet, blocked websites, or frequent connection drops. Many users encounter a situation where the network is visible, the password is entered correctly, but the page in the browser won't open, and an exclamation point appears next to the Wi-Fi icon. The cause is often incorrect settings. DNS — a system that converts domain names (for example, google.com) into IP addresses.

In this article we will look at how to manually register DNS from Google, Cloudflare or Yandex on laptops with Windows 10/11, macOS And LinuxWe'll also explain why this can help speed up your internet and bypass some ISP restrictions. You'll learn how to check your current settings, change them without risking your system, and what to do if your connection is lost after changing your DNS. We'll also cover common errors, such as when your laptop connects to the network but doesn't access the internet.

Why does setting DNS help connect to Wi-Fi?

DNS (Domain Name System) works like the internet's "phone book." When you type a website address, your laptop sends a request to DNS server, which returns the resource's IP address. By default, these servers are assigned by your internet service provider, but they aren't always optimal:

  • 🐢 Slow work: The provider's servers may be overloaded, which slows down the opening of pages.
  • 🚫 BlockagesSome ISPs restrict access to certain websites through their DNS.
  • InstabilityIf the DNS server is down, the internet on your laptop will work intermittently, even if the Wi-Fi signal is strong.
  • 🛡️ Security: Public DNS (eg. Google Public DNS or Cloudflare) are often more reliable and protected from phishing.

Changing DNS on a laptop doesn't affect the speed of the Wi-Fi connection itself (this depends on the router and plan), but it does eliminate delays in loading pages. For example, if you have ping The site's response time is high due to a slow DNS response; changing servers will reduce this time from 300 ms to 20 ms.

⚠️ Note: If your internet connection is completely lost after changing your DNS, check that you haven't entered any typos in your IP addresses. For example, 8.8.8.8 (Google DNS) and 8.8.4.4 - correct addresses, and 8.8.8.9 it won't work.
📊 What DNS are you using on your laptop?
DNS provider (default)
Google Public DNS
Cloudflare
Yandex.DNS
Another

How to check current DNS settings on a laptop

Before changing your DNS, make sure they're the problem. To do this, check your current settings:

On Windows 10/11

  1. Open Command line (Win + R → enter cmdEnter).
  2. Enter the command:
    ipconfig /all
  3. Find the block Wireless Wi-Fi network adapter and look at the line DNS servers.

On macOS

  1. Open Terminal (Command + Space → enter Terminal).
  2. Run the command:
    scutil --dns
  3. Search section resolver #1 — the current DNS will be indicated there.

On Linux (Ubuntu/Debian)

  1. Open Terminal (Ctrl + Alt + T).
  2. Enter:
    nmcli dev show | grep DNS

If you see your ISP's IP addresses in the results (e.g. 192.168.1.1 or addresses in the range 10.x.x.x), then the default settings are being used. Try connecting to alternative DNS to resolve the issue.

Step-by-step instructions: how to change DNS on a laptop

The process varies depending on your operating system. Below are detailed instructions for each.

Windows 10 and 11

  1. Open Parameters (Win + I) → Network and InternetWi-Fi.
  2. Click on the name of your network → Configuring adapter settings.
  3. Right click on Wireless networkProperties.
  4. Select Internet Protocol version 4 (TCP/IPv4)Properties.
  5. Check the box Use the following DNS server addresses and enter:
    • 🔹 Google DNS: 8.8.8.8 And 8.8.4.4
    • 🔹 Cloudflare: 1.1.1.1 And 1.0.0.1
    • 🔹 Yandex.DNS: 77.88.8.8 And 77.88.8.1
  • Click OK and restart your laptop.
  • macOS (Ventura, Monterey, and later)

    1. Open System PreferencesNet.
    2. Select Wi-FiAdditionally.
    3. Go to the tab DNS.
    4. Click + and add addresses (eg 1.1.1.1 And 1.0.0.1).
    5. Delete old addresses (if any) using the button .
    6. Click OKApply.

    Linux (Ubuntu, Mint, Debian)

    In Linux, DNS settings can be changed via Network Manager or by editing the file /etc/resolv.confThe first method is easier:

    1. Open SettingsNet.
    2. Click the gear next to your Wi-Fi.
    3. Go to the tab IPv4 or IPv6.
    4. In the field DNS Enter addresses separated by commas (for example, 8.8.8.8, 8.8.4.4).
    5. Save and reboot the network:
      sudo systemctl restart NetworkManager

    ☑️ Checking after changing DNS

    Completed: 0 / 4

    Table: Comparison of popular DNS servers

    DNS server IP addresses (IPv4) Advantages Flaws
    Google Public DNS 8.8.8.8, 8.8.4.4 High speed, reliability, and phishing protection Google collects data about queries (anonymized)
    Cloudflare 1.1.1.1, 1.0.0.1 Fastest (according to tests), privacy (does not store logs) Sometimes blocks legitimate websites by mistake
    Yandex.DNS 77.88.8.8, 77.88.8.1 Optimized for the RuNet, there are "Safe" and "Family" modes May slow down foreign websites
    OpenDNS 208.67.222.222, 208.67.220.220 Filtering malicious websites, parental control Requires registration for some features

    Cloudflare DNS (1.1.1.1) is the only top-tier server that officially doesn't store user request logs for longer than 24 hours. If privacy is important to you, this is the best choice.

    What should I do if the Internet doesn't work after changing DNS?

    Sometimes, after changing the settings, Wi-Fi connects, but pages won't open. Here's the troubleshooting algorithm:

    1. Check IP addresses: Make sure you entered your DNS without typos. For example, 8.8.8.8 - that's right, but 8.8.8.88 - No.
    2. Flush your DNS cache:
      • 🪟 Windows:
        ipconfig /flushdns
      • 🍎 macOS:
        sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
      • 🐧 Linux:
        sudo systemd-resolve --flush-caches
  • Check your connection to the router: Open Command line and enter:
    ping 8.8.8.8

    If you have ping but websites won't open, there's a DNS issue. If there's no ping, check your Wi-Fi settings or router.

  • Restore default settings: If nothing helps, switch back to automatic DNS acquisition in your network adapter settings.
  • ⚠️ Attention: If after changing DNS you see the error "No Internet access" in Windows, but ping is up 8.8.8.8 It goes away, try turning it off IPv6 in the adapter properties. Sometimes a conflict between IPv4 and IPv6 protocols blocks the connection.
    How to check which DNS is faster?

    Open command prompt and type:

    nslookup google.com 8.8.8.8

    Then repeat with another DNS, for example:

    nslookup google.com 1.1.1.1

    Compare the response time (in milliseconds) in the "Time:" line.

    DNS to Bypass Blocks: Does It Work?

    Many users change DNS to bypass website blocking (for example, Telegram, TikTok or torrent trackers). It works. not always, because:

    • 🔒 IP blockingIf the site is blocked at the IP address level (not the domain), changing the DNS will not help.
    • 🌍 Geo-restrictions: Some services (eg. Netflix) determine your location by IP and block content regardless of DNS.
    • 🛡️ Deep Packet Inspection (DPI): Providers can analyze traffic and block access even when using alternative DNS.

    However, changing the DNS is often effective for bypassing domain-level blocking (when a site is blocked due to Roskomnadzor's decisions). For example:

    • 📱 For Telegram will do Cloudflare DNS (1.1.1.1) or Google DNS.
    • 🎵 For music services (eg. Spotify) it is better to use Yandex.DNS in the "Unlimited" mode.

    If DNS doesn't help, try VPN or Tor - They encrypt traffic and bypass most blocking.

    How to protect your laptop from DNS leaks?

    DNS leak This is when your requests are sent not through an encrypted connection (like a VPN), but through your provider's standard DNS. This is dangerous because:

    • 👁️ Your ISP can see what websites you visit.
    • 🚪 Attackers can intercept traffic on open networks (for example, in a cafe).

    To prevent leaks:

    1. Use DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT)These are protocols that encrypt DNS queries. For example:
      • 🌐 In Firefox: Settings → Network → Enable DNS over HTTPS.
      • 🪟 In Windows 11: Settings → Network → Configure adapter settings → IPv4 properties → Check the "Encrypt DNS" box.
  • Install VPN with DNS leak protection (For example, ProtonVPN or NordVPN).
  • Check yourself for leaks using services like dnsleaktest.com.
  • ⚠️ Note: Some public Wi-Fi hotspots (such as those at airports) forcibly redirect DNS requests to their own servers. In this case, changing the DNS on your laptop won't help—use a VPN.

    FAQ: Answers to frequently asked questions

    Is it possible to use both the provider's DNS and an alternative one at the same time?

    Yes, but that doesn't make sense. The laptop will only use the first working DNS from the list. If you specify multiple addresses (for example, 8.8.8.8 And 1.1.1.1), the system will query them in order until it receives a response. It's best to choose one reliable server.

    Why do some websites load slower after changing DNS?

    This is related to cachingWhen you first access a website through a new DNS, the system "learns" to find its IP address faster. Speed ​​should return to normal within 1-2 days. If not, try a different DNS server.

    How to restore default DNS settings?

    In the network adapter settings (see instructions above), select the option Obtain DNS server address automatically and restart your laptop. You can also reset the network:

    • 🪟 Windows: Settings → Network → Network reset.
    • 🍎 macOS: Remove the network in System Preferences → Network and reconnect.
    Does changing DNS work on mobile devices?

    Yes, but the settings change differently. Android And iOS You need to enter DNS manually in the Wi-Fi network settings or use applications like 1.1.1.1 by Cloudflare.

    Can an ISP block alternative DNS?

    Technically yes, but it requires deep traffic filtering (DPI). In most cases, providers don't block it. Google DNS or Cloudflare, as they are used by millions of users. If access to alternative DNS is blocked, try VPN.