Best DNS for Gaming: Does Changing DNS Really Lower Ping?
DNS does its job once, before you connect to the server, and plays no part in the match itself. Here's where it still matters, how to change it and how to check whether it's worth it.
The advice “set your DNS to 8.8.8.8 and your ping will drop” has been doing the rounds on forums for about fifteen years. It gets repeated in videos, in comments and even by support teams for some games. The trouble is that DNS doesn't touch the packets travelling between you and the game server during a match at all. Changing DNS doesn't change your ping.
That doesn't make DNS useless. A bad ISP DNS can leave your launcher thinking for ten seconds, send an update download to a distant server or throw a connection error outright. Below we explain what DNS actually does, where changing it helps, how to change it in Windows and on your router, and how to check in a minute whether it's worth bothering.
What DNS is and why a game needs it
Computers on the internet find each other by IP addresses like 155.133.248.34. People and programs find names easier to work with: steampowered.com, riotgames.com, epicgames.com. DNS (the Domain Name System) turns a name into an address. Think of it as directory enquiries: you ask where a particular server is, get the number and then make the call yourself.
When you launch a game, roughly this happens:
- The launcher or client wants to reach the login server, for example
login.example-game.com. - Windows first checks its DNS cache. If there's a fresh entry, the answer is ready instantly.
- If there isn't, Windows asks the DNS server set in your network settings. Usually that's your router, which forwards the question to your ISP's DNS server.
- The DNS server returns the IP address and how long the record stays valid (TTL), and the answer is cached on your PC and router.
- The client connects to that IP. From this point on, DNS plays no further part in that connection.
Then the client logs in, loads your friends list and joins the queue. When a match is found, the matchmaking service gives the client the game server's address. In many games that's already a ready-made IP and port rather than a name, so DNS may not be needed to join the match at all. After that, for 30–40 minutes the game exchanges dozens of packets per second with the server over UDP. Not one of those packets passes through a DNS server.
Why DNS doesn't change ping in a match
Ping is the time it takes a packet to get from you to the game server and back. It's made up of several segments: Wi-Fi or the cable to your router, your ISP's network, transit networks, the physical distance to the data centre and processing on the server itself. The DNS server isn't on that list: it sits off to the side of the road your packets travel along.
The consequence is simple: however fast a DNS you set, a packet to a server in Frankfurt or Stockholm takes the same route, through the same network interconnects, at the same speed of light in fibre. To change your ping, you have to change the route itself or remove delay in your home network.
DNS lookup time and ping are different things
The confusion comes from DNS having a “latency” of its own: the time it takes to answer a lookup, usually from a few to tens of milliseconds. It's easy to mistake for ping. But that time is spent once, when the connection starts. If DNS answers in 40 ms instead of 10, the launcher opens the login page 30 ms later. You won't notice, and your in-match ping stays the same.
When changing DNS really helps
There are situations where your ISP's DNS genuinely makes life harder. In all of them, what suffers isn't ping but what happens before or outside the match.
The launcher and login take forever
A modern launcher contacts dozens of domains when it starts: the login server, news, the store, analytics, anti-cheat, friends' profiles. If your ISP's DNS is slow or drops some lookups, each request waits for an answer. By default Windows waits about a second before retrying a lookup, so a couple of lost answers turn into several seconds of blank screen. Switching to a more reliable DNS makes a noticeable difference here: the launcher opens faster, and the store and your profile load without pauses.
The game reports a connection error but websites load
Sometimes your ISP's DNS returns an outdated address or doesn't answer for a particular domain at all. Your browser keeps working off cached entries, while the launcher can't find the login server and says there's no connection. The sign is simple: the game won't get past login or won't load the client, while ping to any address is normal. Flushing the DNS cache and switching DNS servers helps here. We go through cases like this in detail in CS2 can't connect to server and LoL connection problems.
Downloads and updates are slow
Game files and updates are served through content delivery networks (CDNs): a single download domain has dozens of servers around the world. Which one you get is often decided by DNS: it hands out the address of the server that seems closest to whoever asked. If the DNS server is far away from you or doesn't pass the CDN information about your network, the download may come from a server in another country. Download speed drops, and, like everything else in this section, your in-game ping isn't affected.
It works both ways: compared with your ISP's DNS, which sits on the same network as you, a public DNS can either improve the choice of download server or make it worse. If updates download more slowly after you change DNS, switch back. In Steam you can set the download region manually: Settings → Downloads → Download Region.
| Situation | Will changing DNS help? | What actually to do |
|---|---|---|
| High ping in the match | No | Cable, nearest region, check the route |
| Ping spikes and packet loss | No | Wi-Fi, background downloads, QoS, ISP |
| Ping is only high in the evening | No | Congested route, go around it another way |
| Launcher is slow to open and hangs at login | Often yes | Compare DNS servers and pick a fast one |
| Connection error at login, websites work | Sometimes | Flush the cache, change DNS, check game server status |
| Updates download slowly | Sometimes | Download region in the launcher, a different DNS |
Public DNS: what to choose from
A public DNS is a free DNS server anyone can use instead of their ISP's. Big services have servers in many cities, and your lookup goes to the nearest one. The three best-known options:
| Service | Primary | Secondary | IPv6 | Notes |
|---|---|---|---|---|
| Cloudflare | 1.1.1.1 | 1.0.0.1 | 2606:4700:4700::1111 | Focuses on privacy, has variants that filter malicious sites |
| Google Public DNS | 8.8.8.8 | 8.8.4.4 | 2001:4860:4860::8888 | No filtering, answers as is |
| Quad9 | 9.9.9.9 | 149.112.112.112 | 2620:fe::fe | Blocks known malicious domains |
There's no universal answer to which one is “best for gaming”, and any ranking along the lines of “this one is 20% faster” deserves scepticism. Response time depends on where the service's nearest server is and how your ISP routes to it. One player in London gets faster answers from one service, another in Glasgow from a different one, and for a third the fastest turns out to be their ISP's DNS, sitting practically in the next rack.
It's best to set the secondary address from the same service or another reliable one: if the primary doesn't answer, Windows asks the second. Don't set something obscure as the second address, or when the primary fails you'll get the same login problems.
How to test DNS speed
Before changing anything, check which DNS you use now and how quickly it answers. Open Command Prompt (Win + R, cmd) and run:
ipconfig /all
In your adapter's section, find the “DNS Servers” line. If it shows a router address like 192.168.0.1 or 192.168.1.1, your lookups go through the router, which forwards them to your ISP's DNS.
Testing with nslookup
The nslookup command asks a specific DNS server directly. Give it the name and then the server's address:
nslookup steampowered.com 1.1.1.1
nslookup steampowered.com 8.8.8.8
nslookup steampowered.com 9.9.9.9
If the reply has an “Address” or “Addresses” line with IP addresses after the name, the server works. If you see “DNS request timed out”, lookups are being lost. Repeat the command several times: misses on even one lookup in five already explain a launcher that hangs.
Timing it in PowerShell
nslookup doesn't show response time on its own, so PowerShell is handier for timing. Open it (Win + X → Terminal) and run this for each server:
Measure-Command { Resolve-DnsName steampowered.com -Server 1.1.1.1 -DnsOnly -NoHostsFile } | Select-Object TotalMilliseconds
Swap 1.1.1.1 for 8.8.8.8, 9.9.9.9 and your router's address to compare with your ISP's DNS. How to read the results:
- The first lookup may be slower than the rest: the server may not have known the domain yet and asked other servers down the chain. Look at the second and later ones.
- 5–40 ms on repeat lookups is a normal fast DNS, and the difference between options like these isn't noticeable in practice.
- 100–300 ms or more consistently, or errors, means a slow DNS that's worth replacing.
- Variation matters more than the average: if one lookup takes 15 ms and another 900 ms, the server sometimes loses requests.
To also see the ping to the DNS server itself, run ping -n 20 1.1.1.1. It shows how close the server is, but it isn't your in-game ping. Ping to game regions is easier to see in our online ping test, and how to read ping and tracert properly is covered in detail in how to check your ping.
How to change DNS in Windows 11 and 10
Changing DNS in Windows only affects that computer and takes priority over what the router hands out. It's the quickest way to see whether anything changes.
Windows 11
Open your connection
Settings (Win + I) → Network & internet → Ethernet or Wi-Fi → your network or Hardware properties. Look for the DNS server assignment line.
Switch to manual
Click Edit, choose Manual and turn on the IPv4 toggle. Enter a Preferred DNS, for example 1.1.1.1, and an Alternate DNS, for example 1.0.0.1.
Save and flush the cache
Click Save, open Command Prompt and run ipconfig /flushdns so old entries don't skew the test.
If you use IPv6, turn on its toggle in the same window and enter the chosen service's IPv6 addresses, otherwise some lookups will keep going through your ISP's DNS. In Windows 11 you can also turn on DNS encryption (DNS over HTTPS) there for supported servers. It doesn't affect ping, but it hides which domains you look up from your ISP's network.
Windows 10
- Press Win + R, type
ncpa.cpland press Enter. The list of network connections opens. - Right-click your connection (Ethernet or Wi-Fi) → Properties.
- Select Internet Protocol Version 4 (TCP/IPv4) → Properties.
- Tick Use the following DNS server addresses and enter the preferred and alternate addresses.
- Click OK, close the windows and run
ipconfig /flushdnsin Command Prompt.
The same method works in Windows 11 too, if you're more used to the old Control Panel.
How to undo it
In the same windows, choose Automatic (DHCP) or Obtain DNS server address automatically. Your PC will go back to taking DNS from the router. If something doesn't load after experimenting, also run ipconfig /flushdns and restart.
How to change DNS on your router
If you want the new DNS on every device at home, including your console and phones, change it on the router. Menu names vary between manufacturers, but the logic is the same.
- Open the router's web interface. The address is usually
192.168.0.1or192.168.1.1, and it's also shown inipconfigas the Default Gateway. The login and password are most often printed on a sticker on the bottom of the router. - Find the local network settings: a section called LAN, Local Network or DHCP Server. It usually has Primary DNS and Secondary DNS fields.
- Enter the chosen service's addresses and save. Devices pick up the new DNS the next time they connect: reconnect to Wi-Fi or restart your PC.
On some routers DNS is set in the internet connection section (WAN or Internet): there's a tick box like Get DNS automatically and fields for manual addresses. In that case the router itself asks the chosen service and hands out its own address to devices as their DNS. Both approaches work. To check the changes took effect, run nslookup steampowered.com without naming a server: the first lines show which server answered.
DNS and ping myths
The DNS server isn't on the path your game packets take. If your ping changed after switching DNS, something else coincided: a router restart, less load on the network, a different match server.
Ping to 1.1.1.1 only shows the distance to that service's nearest server. The game server is somewhere else, with its own route.
Packet loss happens on Wi-Fi, on a congested connection or on a segment at your ISP. DNS has nothing to do with any of those.
The 5–10 ms difference between decent DNS servers is spent once when you connect. What matters more is that the DNS doesn't drop lookups.
What actually lowers ping
If your goal is fewer milliseconds in the match rather than a faster launcher, work on what lies on the path your packets take. A short plan, in order:
- Check your home network. Run
ping -n 50to your router's address: over a cable it should be about 1 ms, over Wi-Fi up to 3–5 ms with no spikes. If it's higher, sort out your connection first; see our article Wi-Fi vs Ethernet. - Stop background downloads. Steam, torrents, Windows updates and cloud sync clog your connection and cause spikes; more in why ping spikes.
- Pick the nearest region in the game. Nearest by route, not on the map: check several regions in our ping test.
- Look at the route. The
tracertcommand or our route check show exactly where latency grows. If there's a sharp rise on your ISP's or a transit segment, home settings won't remove it. - If the route is bad, change it. A different ISP can do that, or a node that sends game traffic a different way. All the options are covered in how to lower ping.
For specific games we have separate guides with regions and settings: CS2 ping, Valorant ping, Dota 2 ping, League of Legends ping. If your ping climbs in the evening, see why ping is higher in the evening, and if you have several busy devices at home, setting up QoS on your router will come in handy.
Checklist: change DNS or not
| Check | How | Conclusion |
|---|---|---|
| Which DNS you use now | ipconfig /all | A router address means your ISP's DNS |
| Any timeouts | nslookup 5 times in a row | Even one timeout is a reason to switch |
| Response time | Resolve-DnsName inside Measure-Command | Consistently over 100 ms: switch |
| Ping in the match | In-game stats, ping test | DNS won't help, look at the route and network |
| Download speed | Compare before and after changing DNS | Worse: switch back or set the region in the launcher |
| Connection errors | Only at login or in the match | At login, DNS is possible; in the match, it's UDP, network, route |
The bottom line is simple. Switching to a fast, reliable DNS is basic network hygiene that takes a couple of minutes and can speed up your launcher and login. But if you have high ping, spikes or teleporting in the match, look for the cause on the path your packets take: Wi-Fi, downloads, server choice and your ISP's route.
FAQ
What is the best DNS for gaming in 2026?
For in-match ping it makes no difference: DNS isn't involved in carrying game packets. Choose based on reliability and response time on your own connection. The best-known public options are 1.1.1.1 (Cloudflare), 8.8.8.8 (Google) and 9.9.9.9 (Quad9). Test them with the command from this article and keep the one that answers fastest and most consistently.
Can changing DNS lower ping in CS2, Valorant or Dota 2?
No. The game looks up the server's address before the match starts and then exchanges packets with it directly by IP. In-match ping depends on the route to the server, your home network and how busy your connection is, not on DNS.
Why does my game feel better after changing DNS?
Most often because your ISP's DNS was slow or unreliable, which made the launcher, login or store load slowly. That feels like things got faster, but your in-match ping didn't change. Sometimes it also coincides with a router restart or the evening load easing off.
Should I change DNS on my router or in Windows?
If you want the new DNS on every device at home, change it in the router's DHCP settings. If it's only for your gaming PC, it's easier to set it in Windows. In Windows, manually entered addresses take priority over the ones the router hands out.
Is it safe to use a public DNS?
Yes, it's a normal network setting. The DNS server sees which domains you look up, so pick well-known services with a clear privacy policy. Game traffic doesn't go through the DNS server.
What if nothing loads after I change DNS?
Most likely an address was mistyped. Switch DNS back to automatic in your adapter or router settings and run ipconfig /flushdns. If the problem remains, restart your PC and router.
Related reading
Desync in Games: Why You Die Behind Walls and How to Reduce ItWhat desync is in Tarkov, CS2 and Apex: client-side prediction, authoritative servers and lag compensation. How much of it is yours and how to cut it step by step.Read
Discord Voice Lag in Games: Robotic Voice, Cutting Out, DelayWhy Discord voice cuts out, sounds robotic or lags behind while you game. Voice region, Voice & Video settings, CPU load, Wi-Fi and the route to the server.Read
What Is a Good Ping for Gaming? Chart by Genre and GameWhat is a good ping for CS2, Dota 2, Valorant, PUBG and other games: a chart by genre and game, why jitter and packet loss matter as much as the number, how to test yours.Read Try it free for 7 days
No card. Installs in a minute.