Fun with DNS: Three Useful Commands

The DNS is a distributed, hierarchical database where authority flows from the top (or root) of the hierarchy downward.

When thinking of the structure of the DNS, imagine an inverted tree. Each branch of the tree is within a zone of authority; however, multiple branches of the tree can be within a single zone.

The software (Bind being the most common) that stores domain name information is called a domain name server. A single name server can be authoritative for multiple zones. All zones have a primary master and a secondary master name server that provides authoritative responses for their zones.

If you query a name server not authoritative for a particular zone, that name server will most likely have up-to-date information. This is because zone information propagates throughout the Internet at regular intervals, and name servers cache zone information for which they are not authoritative.

DNS Commands

There are three crucial commands that can put all the DNS information you need at your fingertips. The way to use this article is to try each of the commands listed on a domain name, so you can see what the output looks like. Learn by doing!

Zone file database records divide DNS information into three primary types: NS (Name Server) records, MX (Mail Exchange) records, and A (Address) records. NS records indicate the name servers. MX records indicate the hosts that handle e-mail delivery; the priority (pri) number indicates the order in which mail servers are used, with the lowest number receiving the highest priority. The A (Address) records map hostnames to IP addresses, the real names of machines.

host

This is the simplest of the DNS commands. It is a quick way to determine the IP address of a hostname:

: host www.your-domain-name.com

The -a option will return all of the DNS information in verbose format.

: host -a www.your-domain-name.com

Now that you know the IP address for www.your-domain-name.com, try a reverse lookup.

: host IP-ADDRESS

dig (domain information groper)

This command gathers and returns DNS information in a format the name server can use directly. You will find it easy to query specific name servers with dig.

You can quickly determine the Name servers of your host or any other host:

: dig ns your-host.com

Then you check your (or another) website against the host's name servers:

: dig www.your-domain-name.com @ns.your-host.com

Dig can provide output that is in the same format as the zone file itself. Here is how to get the whole zone file:

: dig any your-domain-name.com

Here are the most useful dig query types: dig any (gathers all DNS information), dig ns (gathers name server information), dig mx (gathers mail exchanger information) and dig a (gathers network address information).

The dig command can also do reverse lookups with output formatted for the zone file:

: dig -x IP-Address

nslookup

You can use this tool as a single line command, or you can use it interactively, which distinguishes it from the other DNS commands. Once you have started nslookup, type set all to list the default options. As with dig you can choose the server (name server) you want to query, and you can decide the type of DNS information on which to focus.

Just as you can issue commands to nslookup interactively, you can also change the initial defaults by starting a .nslookuprc file. The format of the .nslookup is one command per line:

set type=NS
set domain=srvns.your-host.com
set timeout=10

Conclusion

These three commands can provide you with most of the information you need about your domain names. They are powerful tools, and this article should provide you enough information to get started or offer a quick refresher if you already use these commands.

About the Author:

Dan Forootan founded ez publishing, inc. in 1998. EZ Publishing's ez publishing, inc. provides the essential tools for using the Web as a marketing tool. The package includes web hosting, the ez publishing, inc. solution. Please email questions or comments about this article to ez publishing, inc.. Thank you.

tidy up service Northbrook ..
In The News:

Mac malware campaign uses fake AI chat results to deliver AMOS through terminal commands, security researchers report. Attackers exploit trust in AI-generated cleanup guides.
States require AI disclosure in healthcare as California, Colorado and Utah implement laws mandating transparency when artificial intelligence influences patient care decisions.
ETA sharing on Apple Maps and Google Maps keeps contacts updated automatically while you drive safely. Learn step-by-step instructions for iPhone and Android.
Data removal from brokers protects against AI-powered scams and deepfake threats in 2026. Learn how data brokers sell your personal information to scammers.
Learn how to act against cybercriminals in 2026 with essential security steps like two-factor authentication, software updates and credit freezing.
Choose between OpenAI releasing Sora text-to-video model, the AI race heating up, or Waymo driverless cars launching in cities across the country
Learn how to set up Google Maps and Apple Maps on your phone to automatically remember where you parked. Step-by-step instructions for enabling location services and parking detection.
Phishing scammers use rnicrosoft.com domain to impersonate Microsoft by replacing "m" with "rn" in typosquatting attacks that steal login credentials.
OpenAI announces new teen safety rules for ChatGPT users under 18, blocking romantic roleplay and requiring extra caution on body image topics.
A 2025 data breach at fintech company 700Credit exposes personal information of more than 5.8 million people through compromised third-party integration partner.
Retailers lose $76.5 billion annually to return fraud as nearly 10% of U.S. retail returns involve fraudulent activity, with $850 billion in returns expected in 2025.
ShinyHunters claims responsibility for stealing 94GB of Pornhub user data affecting over 200 million records and demands Bitcoin ransom.
ChatGPT 2025 now connects to Apple Music, Canva, Expedia, TripAdvisor and OpenTable through built-in apps that help users create playlists, design graphics and more.
Apple releases emergency patches for two zero-day vulnerabilities actively exploited in attacks. iPhone and iPad users urged to update immediately.
DoorDash launches Zesty, an AI-powered social app that recommends restaurants through conversational search, now testing in San Francisco and New York.
Cybersecurity firm Infoblox reveals that over 90 percent of parked domains now redirect visitors to scams and malware, making simple typos extremely dangerous.
The Fox News AI Newsletter covers the latest artificial intelligence technology advancements, including the challenges and opportunities AI presents now and for the future.
GPT-5.2 is now live for all ChatGPT users with improved coding, writing and image interpretation, with Kurt Knutsson offering his review.
New iPhone replacement scam uses pressure tactics and fake carrier calls to steal devices from buyers. Criminals claim shipping errors and demand urgent returns.
Amazon Ring's new facial recognition feature sparks privacy controversy as Electronic Frontier Foundation critics argue the AI upgrade expands surveillance risks.
New Android banking trojan Sturnus steals credentials, reads encrypted messages and controls devices.
Denmark's 3D-printed student village proves automation builds 36 apartments faster than traditional methods. Skovsporet project shows housing future.
Discover Android's new Sound Notifications feature that alerts you to smoke alarms, doorbells, and baby cries even when wearing headphones.
New SantaStealer malware reportedly threatens holiday shoppers with password theft. This Christmas-themed info-stealer targets browsers and crypto wallets.
The Christmas season brings a surge in Netflix phishing scams targeting shoppers with fake emails. Stacey P received convincing scam but verified account first.

Great Web Hosting - What to Look For!

Web hosting can best be described as a modern-day marriage:... Read More

Unlimited Bandwidth in Web Hosting

Bandwidth explained:Bandwidth is the amount of data transfer that you... Read More

Virtual Private Servers (VPS) Web Hosting

A Virtual Private Server (VPS), also referred to as Virtual... Read More

Web Hosting Operating Systems Explained

A few time ago appeared a lot disagreements between opinions... Read More

Managed Vs. Unmanaged Dedicated Hosting

"Unmanaged dedicated servers" - this is a pretty uninviting term... Read More

Web Hosting Data Transfer: How Much Is Too Much?

Bandwidth in its simplest terms refers to the amount of... Read More

Useful Tips When Applying For A Web Host Provider

Once you have considered the design for your website and... Read More

How to Get Better Technical Support

Whenever you have a technical question that needs answering, you... Read More

Business Web Hosting: Which is Right for You?

Business web hosting is what you need. You have a... Read More

Web Hosting: Which Is The Host With The Most?

So you want to publish a web site do you?... Read More

Does Your Host Fight Spam?

Virtually anyone with an email address knows what Spam is,... Read More

Criteria of Choosing an Ideal Web Hosting Company

Before we talk about what it takes to... Read More

Choosing Your Web Hosting Reseller Software

As a web host reseller, one of your most important... Read More

Hosting Your Own Web Server: Things to Consider

Are you disgusted or disappointed with your current web host?... Read More

Choosing the Right Web Host

So you've decided about your website design and now you... Read More

Thinking About Changing to a New Web Hosting Company? 5 Steps to Plan Ahead for the Move

Perhaps your web hosting company has a technical support group... Read More

Will All The $1.95 And Free Hosts Survive?

The main thing wrong today with trying to find a... Read More

The Web Hosting Industry 2005

For the "big things" to be build it was certainly... Read More

Use Your Hobby To Launch A Successful Website

When you study the really successful websites, you will quickly... Read More

Web Site Design and Hosting

If you're looking for a professionally designed web site at... Read More

Beware of the Hidden Perils of Low Cost Hosting

Some folks classify low cost web hosting on the same... Read More

Overselling Web Hosting: What Does It Mean To You?

Overselling is a big trend in the web-hosting world at... Read More

Changing to a New Host? No More Worries!

John's online business is expanding. His customers are increasing day... Read More

Web Hosting Bandwidth -- How Much Bandwidth Is Enough?

Bandwidth in its simplest terms refers to the amount of... Read More

How to Choose a Web Hosting Company?

Nowadays, anybody can afford to order a feature-packed web hosting... Read More

reliable home cleaners Buffalo Grove ..