How to Check Your DNS Servers from the Command Line in Windows 11
Checking which DNS servers your PC uses shows where it sends requests to translate website names into addresses, useful for troubleshooting or verifying a DNS change. Windows 11 reveals your DNS servers from the TANGKAS39 command line.
The Command
ipconfig /all
What It Does
Running `ipconfig /all` displays detailed information for each network adapter, including the DNS Servers line, which lists the addresses your PC uses to resolve domain names. Look under your active adapter, such as Wi-Fi or Ethernet, to find the DNS servers currently configured for that connection, shown as one or more IP addresses.
When You’d Use This
This helps when troubleshooting name-resolution problems, verifying that a DNS change you made took effect, or checking whether your PC is using your provider’s DNS or a custom one you configured. Knowing your DNS servers is useful when deciding whether to switch to a faster or more private public DNS service, since you can confirm what you are currently using.
Useful Variations
In PowerShell, `Get-DnsClientServerAddress` lists the DNS servers per adapter more concisely. To see only relevant lines in Command Prompt, pipe to findstr: `ipconfig /all | findstr “DNS”`. These approaches all reveal which DNS servers handle your name lookups, whether assigned automatically or set manually.
If It Doesn’t Work
If no DNS servers are listed for your active adapter, your connection may not be fully configured, pointing to a broader network issue. Automatically assigned servers usually come from your router or provider, so unexpected entries can indicate a configuration change worth reviewing. Use the PowerShell `Get-DnsClientServerAddress` for a cleaner per-adapter view if the `ipconfig /all` output is hard to parse.
Good to Know
If your DNS servers are assigned automatically, they usually come from your router or internet provider. Seeing unexpected DNS servers can occasionally indicate a configuration change worth reviewing. Knowing your DNS servers helps when deciding whether to switch to alternative public DNS services for speed or reliability.
Putting It Together
Once you have run it once or twice, this becomes second nature. As part of diagnosing and configuring your connection, this command belongs in your toolkit for whenever the network acts up. Used alongside the other networking commands here, it helps you methodically work from confirming basic connectivity to pinpointing exactly where a problem lies. Like anything in the terminal, the real value comes from trying it on your own system and adapting the variations above to what you actually need, so it is worth experimenting with in a safe, low-stakes situation before relying on it in a script or during troubleshooting. Keeping a note of the commands you find most useful, along with the variations that fit your workflow, turns scattered one-off tricks into a personal reference you can draw on whenever a similar task comes up again.