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.

same day cleaning service Mundelein ...
In The News:

Safari's Notify Me can monitor websites for price changes and restocks, while new AI photo tools let you reframe and extend shots in iOS 27.
FLHSMV traced the Florida DMV breach to credentials from a Plant City Police Department user, but ShinyHunters claims over 200,000 driver records.
Tesla's Cybercab launched in Austin with no steering wheel or pedals, but hidden details about age limits and missing safety features may shock riders.
Moderna and Merck's Phase 3 melanoma vaccine trial showed positive results, but full data and FDA approval are still pending for the mRNA therapy.
Malwarebytes data reveals scam texts peak around noon ET with 874% higher volume than overnight, and Fridays bring roughly 50% more messages.
Over 5,400 legitimate websites now serve fake CAPTCHA scams that trick users into pasting malware commands into Windows Run via ClickFix attacks.
Tuya Smart's Doova AI home robot rolls to seniors who call for help and connects family via live video, but key privacy questions remain unanswered.
Jevon Martinez livestreamed himself removing 10 Flock Safety cameras in Bernalillo County, but authorities say eight belonged to neighborhood associations.
A dark web service called Nexus claimed to hold over 153 million driver's license records, and the FBI confirms it is now looking into the incident.
Asking Siri to call American Express connected an 82-year-old woman to a bogus number that nearly drained $100,000 from her Bank of America account.
The Fox News AI Newsletter covers the latest artificial intelligence technology advancements, including the challenges and opportunities AI presents now and for the future.
iPhone Duo opens to a 7.6-inch foldable display starting at $1,999, but Siri Recap's ambient listening on Apple Watch may spark privacy concerns.
Homeowners' association meeting minutes and membership lists can expose names, addresses and emails that scammers use to craft convincing phishing scams.
Lima, Ohio, has installed 3,120 floating solar panels on its Twin Lakes Reservoir, projecting nearly $10 million in electricity cost savings.
Amazon's Alexa for Shopping now lets customers verify suspicious emails, texts and phone calls against the company's own communication records.
Lindsey Brooke Isaacs spent 13 days in jail after a Flock camera flagged her Dodge Durango near a fatal Florida crash that killed three people.
AI-powered smart grocery carts are linked to 32% higher spending, according to new research, as Instacart Caper Carts expand across U.S. stores.
A VPN encrypts your connection on hotel, airport and café Wi-Fi abroad, but streaming catalogs and live sports access still depend on provider rules.
Gmail's Verified Sender Program launches September 8, 2026, giving U.S. political committees a more reliable path to your personal email inbox.
Elroy Air's Chaparral can carry over 500 pounds and fly 450 miles without a runway, and the FAA just tested it under a new federal program.
Bedrock Robotics says its autonomous excavators are doing paid earthwork on active job sites in Texas and Nevada with no operator in the cab.
A dedicated banking computer isolates your financial accounts from malware and phishing, but passwords, SIM swapping and outdated software remain risks.
The OlloNi SS1 AI robot pet uses a 4K camera and facial recognition to learn your family, but its removable Red Heart memory module raises questions.
Nine identity theft warning signs range from unfamiliar credit inquiries to SIM swap attacks that can quietly drain your bank account funds.
Robot.com's R-dog uses articulated legs and wheels to climb stairs and deliver packages, while its built-in screens display paid ads along the route.

EBay Pictures Make Money

If you have ever used EBay then you know how... Read More

Getting The Best Web Hosting For Your Business

After the dot.com bubble burst a few years back I... Read More

How Can I Get The Web Host Services And Support I Need, Hassle-free?

Choosing a host or switching hosts can be an agonizing... Read More

Questions To Ask a Hosting Company Before You Start

There are several types of hosting. Among them are:Free hosting... Read More

Criteria of Choosing an Ideal Web Hosting Company

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

The 14 Point Web Hosting Checklist

How To Select A Web Hosting CompanyWhen starting out, it... Read More

Steps to Becoming a Web Host Reseller

You've decided to get a reseller web hosting account to... Read More

Will All The $1.95 And Free Hosts Survive?

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

Advanced Hosting for the Mission Critical Web Presence

As companies that conduct their business online have proliferated, hosting... Read More

Best Web Hosting Company - Find The Most Affordable Host

If you're creating a community web site or a business... Read More

How to Choose a Web Host - Frequently Asked Questions

In this article you'll be provided with helpful information about... Read More

Windows vs Linux : Hosting

The Basics of Linux & Windows :Linux (and its close... Read More

Benefits of Web Hosting and Choice of a Web Host

Well let me start this way, a lot of people... Read More

How To Find The Best Web Hosting For You

Deciding on the best web hosting company for a web... Read More

Choosing the Right Web Host

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

What Is Web Hosting?

Many businesses, from one-man-bands to multi-national corporations, have a web-presence... Read More

Avoid Getting Ripped Off By A Hosting Company

Chances are if you host multiple domains or websites you... Read More

Cheap Web Hosting - When Cheaper is Better

Anyone who has ever shopped for web hosting knows that... Read More

Setting Up Your First Web Hosting Account

The BasicsSetting up a web hosting account for the first... Read More

Web Hosting Services Absolutely Necessary for Your Websites Success

Web hosting services play a vital part in your website's... Read More

Nine Things To Know Before Selecting The Web Host For Your Business

It may seem simple yet it is often times overlooked.... Read More

Which Is The Better Server Operating System, Unix or Windows?

Anybody who decides to get a web hosting service or... Read More

Domain Name and Web Hosting Hell

Does GoDaddy really suck?I am in the process of registering... Read More

Top 6 Ways to Promote Your Web Hosting Business Part 2

Here are the following three methods that can help you... Read More

What Some Web Hosts Dont Want You To Know

Many start-up web hosts in their desperate attempt to get... Read More

expert residential cleaners Arlington Heights ...