How to Find My Primary DNS

By Aaron Parson

Two command prompt commands, nslook and ipconfig, display your current DNS server, which is used to look up IP addresses.

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.

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

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

Tip

Combine ipconfig with the find command to show only your primary DNS server, cutting out the need to search through the data for the correct line: Run the command ipconfig /all | find "DNS Servers". The text in quotation marks is case sensitive.

Ipconfig showing only the primary DNS server