How to Find My Primary DNS

by Kammy Pow
    Every computer that connects to the Internet receives a primary DNS server address.

    Every computer that connects to the Internet receives a primary DNS server address.

    Jupiterimages/Comstock/Getty Images

    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

    Step 1

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

    Step 2

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

    Step 3

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

    Step 4

    Close the command prompt.

    Mac Computers

    Step 1

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

    Step 2

    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 8.8.8.8., should be the primary DNS server.

    Step 3

    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