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.

move in cleaning service Lake Forest ..
In The News:

The Jetsons Act aims to position Pennsylvania as a leader in advanced air mobility by establishing regulations for hybrid ground-air vehicles.
Fake Geek Squad invoice emails are targeting users with convincing charges and urgent phone numbers to steal personal information and money.
Fox News Digital's artificial intelligence newsletter digs into a robot in Russia that faceplanted, George Clooney's alarm and OpenAI's rivalry with the New York Times.
Major data breach at Conduent exposes personal information of 10+ million people. Government contractor hit by cyberattack affecting Medicaid, child support systems.
Texas startup Janta Power raises $5.5M for innovative vertical solar towers that generate 50% more energy than traditional panels while using just one-third the land.
NASA's twin ESCAPADE spacecraft launched aboard Blue Origin's New Glenn rocket Thursday afternoon from Cape Canaveral, beginning their journey to Mars with arrival expected in 2027.
Learn how to set email reminders on iPhone and Android so you never forget to reply again. Simple built-in features help you stay organized and on top of messages.
Discover how Apple's passkeys revolutionize Mac security by replacing vulnerable passwords with biometric authentication and encryption for ultimate protection.
New survey reveals 78% of parents fear AI scams targeting their kids, yet nearly half haven't discussed these threats. Learn why this dangerous gap exists.
Chrome now autofills passport and driver's license info automatically. Google's latest browser update adds official document support with encryption and user control.
Scammers impersonate Department of Veterans Affairs employees claiming veterans owe money, but real VA communications only direct to VA.gov or official channels.
The AltoVolo Sigma hybrid-electric aircraft flies 500 miles at 220 mph while operating 80% quieter than helicopters, featuring safety systems and compact design.
Google search scam alert: fake customer service numbers can give scammers remote control of your phone. Learn how to spot these traps and protect yourself.
Electric vehicles overtake gas cars in total CO2 savings after just two years of driving, with emissions benefits growing over time as power grids get cleaner.
Louvre Museum reportedly used "Louvre" as password for surveillance system during $100M jewel heist. Learn how weak passwords put even famous institutions at risk.
Bipartisan AI jobs bill from Sens. Hawley and Warner would require companies to report AI-related layoffs and hiring to Department of Labor quarterly.
Joe A. from Shelton, Connecticut, lost $228,000 to a ZAP Solutions cryptocurrency investment scam after his divorce, highlighting rising online fraud.
AI-powered autonomous trucks from Waabi and Volvo target U.S. freight driver shortage with Level 4 self-driving technology and NVIDIA computing platform integration.
Survive flight disruptions with expert travel tips: Book early morning flights, download airline apps and know your refund rights during service cuts.
Apple's iOS 26.1 update delivers major security fixes, performance boosts and enhanced privacy controls for your iPhone. Discover why updating now protects your data.
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.

Transferring Your Existing Website to a New Hosting Provider

You've already got a website, but your current hosting provider... 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

Use Your Hobby To Launch A Successful Website

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

What to Look for in a Free Hosting Provider

The first thing that you must realize when looking for... Read More

Server Host: Where Does My Web Page Go?

For those of you who don't really understand where or... Read More

Finding a Reliable Host

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

Business Web Hosting: Which is Right for You?

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

Questions To Ask a Hosting Company Before You Start

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

Choosing a Hosting Service: A Checklist for Business Owners

For a website to appear on the Internet, you require... Read More

A Simple Guide to Web Hosting

Personal Computers, Servers Or ISP?You need a server to host... Read More

Linux Servers: Do You Understand the Difference?

First of all, some people are worried that they will... Read More

The Ups and Downs of Dedicated Server Hosting

Getting your own dedicated server for your business is a... Read More

Choosing a Quality Web Host

If you are anything like me, you'd probably like to... Read More

Battle Of The Hostings

There are literally thousands of hosting solutions on the internet... Read More

Beware of the Hidden Perils of Low Cost Hosting

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

Cheap Internet Hosting - Get The Most For Your Money With a Cheap Web Hosting Package

With so many web hosting companies competing for your web... Read More

Top 10 Web Hosting Blunders and How to Avoid Them

Consider the following web hosting blunders and do not allow... Read More

Useful Tips When Applying For A Web Host Provider

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

Finding the Right Web Host

Choosing the right Web Hosting service for your website can... Read More

7 Key Points to Consider When Choosing a Web Host

With literally thousands of web hosting companies in the industry... 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

Uptime Guarantee ? Good Idea?

When looking for a Web Host there are lots of... Read More

Monitor Your Web Site for Downtime

For those in the Internet business the availability of their... Read More

How Much Bandwidth Does Your Web Site Need?

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

What You Should Know About Your Web Host

Yesterday I received a nice email in my inbox, I... Read More

pet-friendly home cleaners Glenview ..