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 Glenview ..
In The News:

Scammers are sending fake MetaMask wallet verification emails using official branding to steal crypto information through phishing links and fraudulent domains.
Learn what background permissions, push notifications, security updates, auto-join networks and app refresh mean to better manage your phone's privacy settings.
Criminals test stolen data by applying for deposit accounts in victims' names to prepare bigger attacks. Learn why banks won't share fraud details.
New study of 10,500+ kids reveals early smartphone ownership linked to depression, obesity, and poor sleep by age 12. Earlier phones mean higher risks.
A phone phishing attack compromised Harvard's alumni and donor database, marking the second security incident at the university in recent months.
AutoFlight's zero-carbon floating vertiport uses solar power to charge eVTOL aircraft while supporting emergency response, tourism, and marine energy maintenance.
A new phone return scam targets recent buyers with fake carrier calls. Learn how criminals steal devices and steps to protect yourself from this fraud.
New Anthropic research reveals how AI reward hacking leads to dangerous behaviors, including models giving harmful advice like drinking bleach to users seeking help.
The Fox News AI Newsletter gives readers the latest AI technology advancements, covering the challenges and opportunities AI presents.
Holiday email scams, including non-delivery fraud and gift card schemes, spike in November and December, costing victims hundreds of millions, the FBI says.
Holiday visits offer the perfect opportunity to help older parents with technology updates, scam protection and basic troubleshooting skills for safer digital experiences.
Swiss scientists create grain-sized robot that surgeons control with magnets to deliver medicine precisely through blood vessels in medical breakthrough.
Researchers exploited WhatsApp's API vulnerability to scrape 3.5 billion phone numbers. Learn how this massive data breach happened and protect yourself.
Travel companies share passenger data with third parties during holidays, but travelers can protect themselves by removing data from broker sites and using aliases.
Xpeng's humanoid robot moves so realistically that crowds believed it was fake, marking a major advancement in robotics technology ahead of 2026 commercial launch.
Researchers discover phishing scam using invisible characters to evade email security, with protection tips including password managers and two-factor authentication.
iPhone and Android users can reduce battery drain and data usage by restricting Background App Refresh to Wi-Fi connections instead of mobile networks.
Scammers nearly stole an Apple account by exploiting the support system with authentic-looking tickets and phone calls, users can protect themselves with safety steps.
FoloToy restored sales of its AI teddy bear Kumma after a weeklong suspension following safety group findings of risky and inappropriate responses to children.
Threat intelligence firm Synthient uncovers one of the largest password exposures ever, prompting immediate security recommendations.
Viral video shared by Elon Musk shows Tesla's Optimus humanoid robots performing tasks from cooking to construction, garnering over 58.5 million views on social media.
Chinese hackers used Anthropic's Claude AI to launch autonomous cyberattacks on 30 organizations worldwide, marking a major shift in cybersecurity threats.
Apple's new Sleep Score feature gives you a rating for your nightly rest quality. Learn how to set it up on your Apple Watch and iPhone today.
Essential phone settings to enable before losing your device, including Find My network, location services and security features for iPhone and Android.
The Fox News AI Newsletter gives readers the latest AI technology advancements, covering the challenges and opportunities AI presents.

More Profits in Your Website Hosting Business

If you run a website hosting business, you already know... Read More

How to Choose a Web Host - Frequently Asked Questions

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

How To Choose A Reliable Web Host For Your Website

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

Choosing a Web Host Based On Price? Dont!

It's tempting. There are so many companies offering cut-rate hosting... Read More

Tips on Finding a Hosting Service for Your Business Website

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

Server Host: Where Does My Web Page Go?

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

Small And Medium Businesses Embrace Servers Running Linux

Although we are aware of Linux adoption by large enterprises,... Read More

A Simple Guide to Web Hosting

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

How to Move Your Domain Without Any Downtime

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

Reseller Web Hosting - A Cheaper Alternative?

There comes a time when the internet bug hits us... Read More

How Multiple Server Hosting impacts your websites uptime

This article describes the technology behind multiple server hosting and... Read More

Steps to Becoming a Web Host Reseller

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

Budget Web Hosting - Dirty Secrets That Can Squash Your Websites Chance of Success

When it comes to budget web hosting, there are a... Read More

Choosing a Quality Web Host

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

Unique Features that Leading Web Hosts are Now Offering

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

How to Find a Dependable Web Host

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

Great Web Hosting - What to Look For!

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

How Much Bandwidth Does Your Web Site Need?

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

Choosing a Web Hosting Provider from 40 Million Other Web Hosts - Pt1

Discover how to go about choosing a web hosting provider... Read More

How to Get Better Technical Support

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

Niche Hosting

There is story of David and Goliath where Goliath would... Read More

Finding the Right Web Host

Choosing the right Web Hosting service for your website can... 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

Web Hosting; Make Them Work for You

There are two main types of host providers. They are... Read More

The Web Hosting Industry 2005

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

maid service near Winnetka ..