How to Find My Primary DNS

by Kammy Pow

The Domain Name System, or DNS, is a computer database that resolves alpha URL addresses into its numeric equivalent, also known as the IP address. When a computer connects to the Internet, it is assigned a primary DNS and a secondary DNS server address. Internet service providers usually assign the DNS servers, but computers that connect to an internal router are assigned a DNS server from the router. When troubleshooting why a computer cannot connect to the Internet, technicians may request the DNS server addresses. The methods used to identify the DNS servers are different for Mac and Windows computers, but both use a command-line utility to arrive at the same information.

Windows Computers

Click the "Start" button, type "cmd" in the search box and press the "Enter" key to open the command prompt.

Type "ipconfig /all" at the command prompt and press the "Enter" key.

Find the "DNS Servers" lines. The first IP address is the primary DNS server.

Close the command prompt.

Mac Computers

Launch "Applications." Open the "Utilities" folder and double-click "Terminal."

Type "networksetup -getdnsservers Wi-Fi" at the prompt for computers running Mac OS X 10.7 and "networksetup -getdnsservers airport" for computers running earlier versions of Mac OS X 10.6. Instead of "airport" use "bluetooth" or "ethernet" for Bluetooth or Ethernet connections, respectively. The first DNS server address, or second if the first is, should be the primary DNS server.

Close Terminal.

About the Author

Kammy Pow studied biological sciences at the University of California Irvine. She spent 13 years as a programmer for the financial, medical research, and healthcare sectors. She has been freelancing since 2005 and currently writes health-care related material and pens the occasional review for Southern California altweeklies.

Photo Credits

  • Jupiterimages/Comstock/Getty Images