How to Check Your DNS Records Yourself with dig, nslookup and Online Tools

When your website or email isn't behaving after a DNS change, the fastest way to find out why is to look up your DNS records yourself. This guide shows you how to check DNS records with dig, nslookup and free online tools -- which command to use for each record type, how to ask our nameservers directly, and how to read the answers.

Which tool should I use?

ToolWhere it runsBest for
nslookupBuilt into Windows, Mac and LinuxQuick checks from any computer.
Resolve-DnsNameWindows PowerShellClearer output than nslookup on Windows.
digBuilt into Mac and most Linux systemsDetailed answers, TTLs, tracing and DNSSEC.
Online checkersYour web browserSeeing what the rest of the world sees, from many countries at once.

In the examples below, replace example.com with your own domain. IP addresses shown in sample output (such as 203.0.113.10) are reserved example addresses -- yours will be different.

Know what you're looking for

Before you run anything, decide which record answers your question:

  • Website not loading or showing an old site? Check the A record (and AAAA) for example.com and www.example.com. It should match the Shared IP Address shown in cPanel's General Information panel.
  • Just changed nameservers? Check the NS records.
  • Email not arriving? Check MX.
  • Mail going to spam, or a service can't verify your domain? Check TXT (SPF, DKIM, DMARC, verification codes).
  • A service says to add a CNAME? Check CNAME for that exact name.

Our nameservers are ns5.instantaccess.net, ns6.instantaccess.net, ns1.fanaticalhosting.com and ns2.fanaticalhosting.com. If your domain uses them, your records are managed in cPanel under Domains > Zone Editor.

Checking DNS with nslookup (Windows, Mac, Linux)

On Windows, press the Windows key, type cmd and open Command Prompt. On a Mac, open Terminal from Applications > Utilities.

nslookup example.com
nslookup www.example.com
nslookup -type=NS example.com
nslookup -type=MX example.com
nslookup -type=TXT example.com
nslookup -type=TXT default._domainkey.example.com
nslookup -type=TXT _dmarc.example.com

A typical answer looks like this:

Server:  dns.google
Address:  8.8.8.8

Non-authoritative answer:
Name:    example.com
Address:  203.0.113.10

The first two lines are the resolver that answered (your internet provider's, or the one you named). "Non-authoritative" just means the answer came from a resolver's memory rather than straight from your domain's nameservers. That's normal.

Ask a specific resolver

Add a server name or address to the end of the command to skip your internet provider's cache:

nslookup example.com 8.8.8.8
nslookup example.com 1.1.1.1

Ask our nameservers directly

This is the most useful trick. It shows what the Zone Editor currently holds, with no caching at all:

nslookup -type=MX example.com ns5.instantaccess.net

If our nameserver shows the new value but 8.8.8.8 still shows the old one, your change is correct and you're just waiting for caches to expire. If our nameserver shows the old value, the change didn't save -- go back to the Zone Editor.

Checking DNS with PowerShell (Windows)

Open PowerShell (Windows key, type powershell) and use Resolve-DnsName:

Resolve-DnsName example.com -Type A
Resolve-DnsName example.com -Type MX
Resolve-DnsName example.com -Type TXT
Resolve-DnsName example.com -Type NS -Server 8.8.8.8
Resolve-DnsName example.com -Type A -Server ns5.instantaccess.net

The output is a table with the name, type, TTL and value, which is easier to read than nslookup's.

Checking DNS with dig (Mac and Linux)

dig comes with macOS and most Linux systems. On Windows it isn't built in -- use nslookup, PowerShell or an online tool instead. If you have SSH access, you can also try dig in cPanel's Advanced > Terminal; if it reports "command not found," use the other methods.

Short answers

dig example.com +short
dig www.example.com +short
dig example.com NS +short
dig example.com MX +short
dig example.com TXT +short
dig default._domainkey.example.com TXT +short

+short prints only the values, which is usually all you need.

Full answers, including TTL

dig example.com A

Look for the ANSWER SECTION:

;; ANSWER SECTION:
example.com.      3187    IN    A    203.0.113.10

The number after the name (3187 here) is the TTL remaining in seconds. It tells you how long this resolver will keep the old answer before asking again -- here, about 53 minutes. If you see status: NXDOMAIN near the top instead, the name doesn't exist in DNS at all.

Ask a specific server

dig @8.8.8.8 example.com A +short
dig @ns5.instantaccess.net example.com MX +short

Follow the whole chain with +trace

dig example.com +trace

This starts at the internet's root servers, then asks the .com servers which nameservers your domain uses, then asks those nameservers for the answer. It's the best way to confirm a nameserver change reached the registry. If the .com step still lists your old nameservers, the change hasn't gone through at the registrar yet.

Check a reverse (PTR) record

dig -x 203.0.113.10 +short

This shows the hostname an IP address belongs to. Reverse DNS for our servers is set by us, not in cPanel.

Checking DNS with online tools

Online tools are handy when you don't want to use a command line, or when you want to see the answer from many places at once.

  • whatsmydns.net and dnschecker.org -- enter your domain, pick a record type, and see answers from dozens of locations. A mix of old and new values means propagation is still under way. See DNS Propagation: Why Domain Changes Take Time and How to Check.
  • Google Admin Toolbox Dig (toolbox.googleapps.com/apps/dig) -- a simple web version of dig. Good for TXT and MX checks.
  • MXToolbox (mxtoolbox.com) -- MX, SPF, DKIM and DMARC lookups, plus blacklist checks for mail problems.
  • ICANN Lookup (lookup.icann.org) -- shows which registrar your domain is with, its expiry date, its status codes and the nameservers set at the registry. Use this when you're not sure where your domain is registered.
  • DNSViz (dnsviz.net) -- a diagram of your domain's DNSSEC chain. Red items mean something is broken.

Reading the results: common situations

What you seeWhat it meansWhat to do
NS shows old nameserversThe registrar change hasn't saved, or hasn't reached the registry yet.Check at your registrar. Allow up to 24-48 hours.
A record shows an address that isn't your Shared IP AddressYour website is pointed at another server.Fix the A record in the Zone Editor, or at your outside DNS provider.
Two different A records for the same nameVisitors are split between two servers.Delete the wrong one.
NXDOMAIN or "Non-existent domain"The name doesn't exist -- a missing record, a typo, or an expired domain.See DNS_PROBE_FINISHED_NXDOMAIN.
SERVFAILThe resolver couldn't get a valid answer. Often a DNSSEC mismatch or a nameserver problem.Check with DNSViz, then open a ticket.
Two TXT records starting with v=spf1SPF is invalid; receivers may treat your mail as unverified.Merge them into one record.
MX shows the old email providerMail is still going to the old service.Update MX, then wait out the TTL.

Troubleshooting

"Server failed" or "connection timed out; no servers could be reached"

Your computer couldn't reach the resolver at all. Check your internet connection, turn off any VPN, and try again with 8.8.8.8 or 1.1.1.1 at the end of the command.

My computer shows the old value but online tools show the new one

Your own computer has the old answer cached. Run ipconfig /flushdns on Windows, or sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder on a Mac.

A TXT record looks split into pieces

Long TXT values such as DKIM keys are stored in chunks of up to 255 characters and shown as several quoted strings side by side. That's normal -- mail servers join them back together.

The lookup for ns5.instantaccess.net works but my domain shows nothing

If asking our nameserver directly returns no answer for your domain, and your domain uses our nameservers, open a ticket. Include the exact command you ran and its output.

Common questions

Do I need to install anything?

No. nslookup is built into every desktop system, PowerShell is built into Windows, and dig comes with macOS. Online tools need only a browser.

Why do different tools give different answers?

Each resolver caches answers for the record's TTL. Right after a change, some resolvers have the new value and some still have the old one. Asking our nameservers directly shows the true current value.

How do I check a subdomain?

Use its full name, for example nslookup shop.example.com or dig shop.example.com +short.

What should I include in a support ticket about DNS?

The domain name, what you expected to see, the exact command you ran, and a copy of the output. If you use an outside DNS provider such as Cloudflare, say so. Never include passwords.

Related guides

Still stuck? Open a support ticket and the Instant Access Internet Services team will help.

Ultrafast LiteSpeed hosting from InstantAccess.net: free SSL, free backups, cPanel included, no contracts. Check out our $10/month hosting.
  • check dns records, nslookup mx record, dig command examples, check nameservers of domain, dns lookup tool, resolve-dnsname powershell, check txt record spf dkim
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Use Microsoft 365 or Google Workspace Email with Your Domain

You can keep your website with us and use Microsoft 365 (Outlook) or Google Workspace (Gmail) for...

Our Nameservers: How to Point Your Domain to Your Hosting

To make your website and email work on your hosting account, your domain has to point to the...

DNS Propagation: Why Domain Changes Take Time and How to Check

When you change your nameservers or edit a DNS record, some people see the change right away...

How to Set Up Dynamic DNS in cPanel

Dynamic DNS (DDNS) lets you reach a device on a home or office connection, such as a camera, NAS...

Free SSL Certificates: How AutoSSL and SSL/TLS Status Work

Every hosting account includes free SSL certificates, so your website loads over HTTPS with a...