How to Find My Primary DNS

Domain Name System servers convert domain names into the Internet Protocol addresses that computers use to find each other over the Internet. To figure out which DNS server your computer uses -- be it a server provided by your Internet Service Provider or an alternative such as Google DNS or OpenDNS -- use either the nslookup or ipconfig tool from the command prompt.

Open the Command Prompt

Both methods of finding your DNS server use the command prompt. To open it, press Windows-R and run cmd. Searching for and opening cmd on the Start screen or Start menu works as well.

Starting the command prompt
The directory in the prompt doesn't matter for this task.
credit: Image courtesy of Microsoft

Use Nslookup

Nslookup -- short for "name server lookup" -- is a tool designed to search for the IP addresses of websites by running them through a DNS server of your choice. If you use nslookup without specifying a DNS server, however, it uses your default DNS server, and displays the name and IP address of that server, making it perfect for the task at hand.

To find your DNS server with nslookup, just run nslookup at the command prompt.

Nslookup using an OpenDNS server
To return to the regular prompt, type exit.
credit: Image courtesy of Microsoft

Use Ipconfig

The more traditional, though less convenient, method to find your DNS server uses ipconfig, a tool that reports various data about your Internet connection. Ipconfig has the advantage of showing both your primary and secondary DNS servers, but it doesn't provide their names like nslookup does -- it only lists them by their IP addresses.

To see your DNS servers, run ipconfig /all and scroll up to find the "DNS Servers" line. The first IP address is your primary server and the second is your secondary.

Ipconfig showing DNS servers
DNS servers show up only when you include the /all option.
credit: Image courtesy of Microsoft
Ipconfig showing only the primary DNS server
The vertical bar sends the output of one command to a second command.
credit: Image courtesy of Microsoft