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.

trusted cleaning company Bannockburn ..
In The News:

Russian hackers use fake CAPTCHA tests to spread dangerous malware targeting governments and journalists. Learn how to protect yourself from these deceptive attacks.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Miami-Dade debuts America's first autonomous police SUV with AI cameras, drone deployment and real-time crime detection in groundbreaking law enforcement pilot.
Bank impostor scams cost Americans $2.9 billion as criminals use AI voices and caller ID spoofing to steal life savings. Learn nine essential fraud protection tips.
Foreign-owned apps secretly harvest personal data from seniors, making them prime targets for scams. Learn how to protect your privacy and stop data brokers today.
Sens. Josh Hawley and Richard Blumenthal introduce bipartisan GUARD Act to protect minors from AI chatbots through mandatory age verification and disclosure requirements.
Ghost-tapping scammers exploit wireless technology to drain accounts through small transactions, but RFID-blocking wallets and transaction alerts can protect you.
French pilot project demonstrates wireless charging roads that can deliver over 300 kilowatts of power to EVs while driving, potentially eliminating range anxiety.
YouTube's Ghost Network spreads information-stealing malware through thousands of fake videos offering cracked software, using compromised accounts and fake engagement.
Protect your privacy by disabling your smart TV microphone. Most TVs have hidden mics that listen even when voice commands are off. Learn quick steps to stop unwanted audio capture.
SessionReaper vulnerability hits Magento and Adobe Commerce stores, compromising 250+ sites in one day. Hackers steal data and hijack shopping sessions.
Master essential parental controls and digital safety tools to protect your kids online. Learn screen time limits, location settings and privacy controls every parent needs.
Cybersecurity expert shares six essential steps to protect against dark web threats, including data removal services, password managers and antivirus software.
NVIDIA GPU space mission could revolutionize cloud services by enabling orbital data centers that make apps, games and AI tools faster and more efficient.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Microsoft warns Windows 10 users face serious security risks as 90% of ransomware attacks target unsupported systems. Learn why upgrading to Windows 11 is crucial.
Nike unveils Project Amplify, revolutionary motorized shoes developed with Dephy that add powered assistance to every step for runners and walkers.
Cybersecurity experts warn about one of the largest credential compilations ever found, urging users to check "Have I Been Pwned" and change passwords immediately.
Quick iPhone and Android battery optimization techniques help your device stay powered all day by turning off hidden features that secretly drain power in the background.
Kodiak Driver autonomous truck achieves perfect 98 safety score, matching top human fleets in groundbreaking AI evaluation by Nauto's VERA system.
New 401k catch-up contribution rules in 2026 will change taxes for high earners over 50. Learn how scammers exploit these changes and protect your retirement savings.
Kurt Knutsson's guide covers social media privacy protection through location settings, account privacy controls and two-factor authentication to prevent scams and data breaches.
Revolutionary retinal implant restores central vision in 80% of patients with advanced macular degeneration, offering hope where treatments once only slowed blindness.
Learn how to use passkeys on Windows and Mac computers without cameras or fingerprint readers. Discover secure authentication methods that replace passwords.
Tesla's FSD v14.1.2 update reintroduces Mad Max mode, enabling higher speeds and more frequent lane changes than the standard Hurry profile setting.

Unique Features that Leading Web Hosts are Now Offering

Some web hosts are offering more than others for the... Read More

The #1 Factor New Webmasters Forget to Consider when Choosing a Web Hosting Plan

The ProblemToo often new webmasters sign-up with the first good... Read More

How to Move Your Domain Without Any Downtime

With a little advanced planning, moving your domain to a... Read More

What Is Web Hosting?

The best way to explain this is by comparing it... Read More

How to Choose a Web Host - Frequently Asked Questions

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

Tips on Finding a Hosting Service for Your Business Website

There are so many hosting companies offering to host your... Read More

Where to Get Cheap Web Hosting

First, to see if you can use cheap web hosting... Read More

Linux Web Hosting: The All You Need to Know

Linux web hosting is so named, based on the operating... Read More

Managed Hosting

Managed hosting is a dedicated server that is accompanied by... Read More

How Much Bandwidth Does Your Web Site Need?

One of the most common concerns people have when deciding... Read More

Web Hosts: Helping Us Navigate Through This Future Techno-World

Computers, Internet, Web sites?what do they all mean? Hey, you're... Read More

The Perfect Support

Hosting Support ? An IntroductionImagine yourself as a person running... Read More

UNIX vs. Windows- What Server Operating System Should You Use for Your Web Hosting?

So you've decided to create a website? The most obvious... Read More

Criteria of Choosing an Ideal Web Hosting Company

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

How to Know When It is Time for Your Website to Move On to Dedicated Servers

Knowing when it is time to move onto a dedicated... Read More

In Search of Webhosting: First Understand the Industry

In search of a webhosting company for personal or small... Read More

Finding a Home for Your Internet Enterprise - A Point by Point List

After much Net surfing and looking at all the offers... Read More

Cheap Web Hosting is No Bargain

Ever heard the saying "Penny-wise and Dollar-foolish"?Well bargain priced website... Read More

How to Find a Dependable Web Host

Your new website is ready to upload, and now you... Read More

The Top 10 Essential Ingredients of Every Linux Hosting Plan (Package)

Any website comprises the following ? Domain name, Webspace, Webpages.Lets... Read More

Shared Web Hosting Service Explained!

The next concern for you after designing and developing web... Read More

Cheap Web Hosting - When Cheaper is Better

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

How You Pay More for Unused Web Space and Traffic

"2GB web space with 50GB traffic for $5.95 per month!"A... Read More

How To Change Your Web Hosting Provider ? Step-By-Step Guide

Whether you are disgruntled with the level of service your... Read More

How To Choose A Reliable Web Host For Your Website

A client of mine paid for a solo advert to... Read More

luxury cleaning services Lake Forest ..