Nslookup (Name Server Lookup) is a command that queries DNS servers and shows a domain's IP address, MX (email) records and other DNS information. It comes built into Windows, macOS and Linux.
When to use it
- To check whether a DNS change has propagated
- To see which server receives your email (MX)
- To see whether your site points to the right IP address
How do I run it?
- Windows: Type
cmdin the Start menu and open Command Prompt. Mac: Open the Terminal app. - Type one of the commands below and press Enter.
- In the result, the Address line shows the IP address and the mail exchanger line shows the mail server.
Common commands
| What do you want to know? | Command |
|---|---|
| The domain's IP address | nslookup yourdomain.com |
| Mail server (MX) | nslookup -type=mx yourdomain.com |
| Name servers (NS) | nslookup -type=ns yourdomain.com |
| TXT records (SPF etc.) | nslookup -type=txt yourdomain.com |
| CNAME record | nslookup -type=cname www.yourdomain.com |
| Query a specific DNS server | nslookup yourdomain.com 8.8.8.8 |
| Domain from IP (reverse DNS) | nslookup 8.8.8.8 |
If your name servers point to webevi, the NS query should show dns1.webevi.com and dns2.webevi.com. For what each record type means: DNS record types.
Need help? Open a support ticket from your client area or call +90 216 348 35 03.
