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.

disinfecting cleaning services Highland Park ..
In The News:

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.
A phishing email scam targeting American Express customers shows how cybercriminals use fake urgent messages to steal personal and financial information.
Facebook's new Meta AI feature analyzes your camera roll photos to create polished collages automatically, but requires cloud processing and raises privacy concerns.
A New Jersey teenager filed a major lawsuit against AI/Robotics Venture Strategy 3 Ltd. over ClothOff, an AI tool that created fake nude images from her social media photos.
Microsoft reports Storm-2657 cybercriminals sent phishing emails to 6,000 addresses at 25 universities to steal payroll credentials and redirect funds.
Astronomers have discovered asteroid 2025 SC79, a skyscraper-sized space rock orbiting the sun in just 128 days. the second-fastest known.
The Fox News AI Newsletter delivers the latest developments form the world of artificial intelligence, including the technology's challenges and opportunities.
A cyberattack on SimonMed Imaging exposed personal information of 1.2 million patients, including medical records, financial details and identity papers.
Spotify's managed accounts for kids under 13 now available in at least seven countries, allowing parents to filter and block explicit content and songs.
Friendly text conversations about BBQs and social events can lead to WEEX gold trading scams that target older adults with fake investment opportunities.
California company Skyeports creates self-healing glass spheres from Moon regolith that generate solar power and support plant growth for sustainable lunar living.
Cleafy researchers discover fake VPN streaming app Mobdro Pro that installs Klopatra banking Trojan, giving attackers full control over Android devices.
Police departments across the U.S. and Canada are adopting virtual reality training to better prepare officers for high-pressure, real-world situations.

Tips on Finding a Hosting Service for Your Business Website

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

The Web Hosting Industry 2005

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

Choosing a Right Hosting Solution

You must have done all the hard works for developing... Read More

How to Achieve # 1 on Free Hosting

A domain name and paid hosting are considered essential for... 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

Web Hosting: Shared or Dedicated - Which Should You Choose?

Before you begin your search for a web host you... Read More

Web Hosting Bandwidth -- How Much Bandwidth Is Enough?

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

Dedicated Web Hosting Explained

Why is dedicated hosting such a big hit on the... Read More

Provide A Good Home For Your Website

Selecting a web hosting company is like sending one of... 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

What to Look for in a Web Host

The first questions you have to ask yourself are: how... Read More

Shared Web Hosting Service Explained!

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

Dedicated Server vs. Co-location Web Hosting

So - you know shared hosting no longer cuts it,... Read More

What Is Web Hosting?

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

Web Hosting Providers - Find A Newbie Friendly Web Site Host

If you're about to set up your first web site... Read More

How to Find a Dependable Web Host

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

Web Site Hosting ? An Easy Guide

Web Hosting ? Made Simple What is web hosting... Read More

Finding a Reliable Host

Finding reliable hosting for your business opportunity is no small... Read More

Unlimited Bandwidth in Web Hosting

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

Types of Web Site Hosting

First of all we must determine the meaning of the... Read More

Hosting Your Way All The Way To The Bank

Let's face it, the Internet is here for good. Today's... Read More

How To Choose The Best Web Host For You

Web Hosting is a service. Auto mechanics also provide a... Read More

Cheap Web Hosting is No Bargain

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

Fun with DNS: Three Useful Commands

The DNS is a distributed, hierarchical database where authority flows... 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

best cleaning company Winnetka ..