# How to check DNS records with dig, nslookup and online tools

Source: https://dijituldns.co.uk/guides/how-to-check-dns-records/
Updated: 2026-10-18

> To check DNS records, run dig on a Mac or Linux, or nslookup on Windows, for the name and record type you want. Query your authoritative nameserver to see what is really set, and a public resolver to see what visitors get. dijitul diagnoses DNS problems at £45 an hour + VAT.

## Key facts

- dig is built into macOS and most Linux systems.
- nslookup is built into Windows.
- Querying the authoritative nameserver shows what is actually configured.
- Querying a resolver shows the cached answer visitors may be getting.
- Online lookup tools query from several places, useful for spotting caching.
- TTL in the answer shows how long the resolver will keep it.

## Two places to ask

Before you run any command, understand that there are two different answers you might want:

- **The authoritative answer** comes straight from your domain's nameservers. It tells you what is actually set in your DNS right now.
- **The cached answer** comes from a resolver, such as your broadband provider's. It is what visitors are getting, and it may be out of date until the TTL expires.

If the authoritative answer is right but a resolver is wrong, you only need to wait. If the authoritative answer is wrong, the record needs fixing at your DNS host. See [how DNS works](https://dijituldns.co.uk/guides/how-dns-works/) for why.

## Checking with dig (Mac and Linux)

Open Terminal and try:

- `dig example.co.uk A +short` shows the website's IPv4 address.
- `dig example.co.uk MX +short` lists mail servers and priorities.
- `dig example.co.uk TXT +short` shows SPF and verification records.
- `dig _dmarc.example.co.uk TXT +short` shows the DMARC record.
- `dig example.co.uk NS +short` shows the nameservers.

To ask the authoritative server directly, add it with an @ sign: `dig @ns1.example-dns.net example.co.uk MX`. Without +short, dig shows the full answer, including the TTL in seconds next to each record. `dig example.co.uk +trace` follows the lookup from the root servers down, which is handy after a nameserver change.

## Checking with nslookup (Windows)

Open Command Prompt or PowerShell and try:

- `nslookup example.co.uk` shows the address records.
- `nslookup -type=mx example.co.uk` lists mail servers.
- `nslookup -type=txt example.co.uk` shows TXT records.
- `nslookup -type=ns example.co.uk` shows the nameservers.

To ask a specific server, put it at the end: `nslookup -type=mx example.co.uk ns1.example-dns.net`. The words "Non-authoritative answer" mean the reply came from a resolver's cache, not from your nameserver.

PowerShell also has `Resolve-DnsName example.co.uk -Type MX`, which gives tidier output.

Whichever tool you use, check the name carefully. A DKIM record lives at a selector name such as google._domainkey.example.co.uk, not at the domain itself, so a lookup on example.co.uk will not show it. If a lookup returns nothing at all, check for typos in the name, then confirm the record exists in the control panel of the provider your nameservers point to.

## Online lookup tools

Web based DNS lookup tools do the same job in a browser. The more useful ones query from resolvers in several countries at once, so you can see whether a change has reached everyone or some places still have the old answer. Others check whole sets of email records and flag problems such as two SPF records or a missing DKIM key.

They are a good quick check, but remember they show what their own resolvers see. For the definitive answer, query your authoritative nameserver directly. If records look wrong everywhere, compare them with what is in your DNS control panel, and make sure you are editing the provider your nameservers actually point to. Our [DNS records explained](https://dijituldns.co.uk/guides/dns-records-explained/) guide helps you read the results.

## How dijitul helps

If the results do not make sense, we can check every record, find where the DNS really lives and fix it. On its own this is £45 an hour + VAT. DNS management is included with dijihost Complete Hosting at £1 a day + VAT. See [DNS troubleshooting](https://dijituldns.co.uk/dns-troubleshooting/) and [DNS management](https://dijituldns.co.uk/dns-management/), or call [01623 650333](tel:01623650333).

## FAQs

### What is the difference between dig and nslookup?

Both look up DNS records. dig comes with macOS and Linux and gives detailed output, including TTLs. nslookup comes with Windows and is simpler. On Windows, PowerShell's Resolve-DnsName is another option with clearer output than nslookup.

### Why do I get a different answer from different tools?

Each tool asks a resolver, and each resolver may have cached a different version of the record. Once the old record's TTL has passed everywhere, the answers will match. Query the authoritative nameserver to see the true current value.

### What does "non-authoritative answer" mean?

It means nslookup got the answer from a resolver's cache rather than from your domain's own nameservers. It is not an error. To get an authoritative answer, add one of your nameservers to the end of the command.

### How do I check my email DNS records?

Look up MX for incoming mail, TXT at the domain for SPF, TXT at _dmarc for DMARC, and the DKIM record at the provider's selector, such as google._domainkey or selector1._domainkey. Check there is only one SPF record.

### How do I find my domain's nameservers?

Run dig example.co.uk NS +short on a Mac or Linux, or nslookup -type=ns example.co.uk on Windows. The names returned tell you which provider hosts your DNS, which is where any record changes must be made.

## Prices and contact

Domains are priced live in the client portal. DNS management and 10 mailboxes are included with dijihost Complete Hosting at £1 a day + VAT. On their own, DNS and email set-up is £45 an hour + VAT or a fixed quote. Domain search and registration: https://clients.dijitul.uk. Hosting: https://dijihost.co.uk/ (£1 a day + VAT). Contact: https://dijituldns.co.uk/contact/ · 01623 650333 · info@dijitul.uk
