host – Simple DNS Lookup Utility

host is a simple yet powerful DNS lookup utility that performs forward and reverse DNS...

Networking Tools Linux Open Source

host is a simple yet powerful DNS lookup utility that performs forward and reverse DNS queries. While dig provides comprehensive output, host offers a cleaner, more readable format that’s perfect for quick lookups and scripting. It’s commonly used to verify DNS configurations, troubleshoot name resolution issues, and check mail server records.

As part of the BIND utilities package, host has been a staple tool for system administrators for decades. Its straightforward output makes it ideal for both interactive use and integration into shell scripts for automated DNS monitoring and verification tasks.

Key Features

  • Simple Output – Clean, easy-to-read results
  • Forward Lookups – Hostname to IP resolution
  • Reverse Lookups – IP to hostname resolution
  • Record Type Queries – A, AAAA, MX, NS, TXT, SOA, and more
  • Server Selection – Query specific DNS servers
  • Scripting Friendly – Easy to parse output

Installation

sudo apt install dnsutils     # Debian/Ubuntu
sudo dnf install bind-utils   # Fedora/RHEL
sudo pacman -S bind           # Arch Linux

Basic Usage Examples

# Basic A record lookup
host example.com

# Query specific record type
host -t MX example.com
host -t NS example.com
host -t TXT example.com
host -t AAAA example.com

# Reverse DNS lookup
host 8.8.8.8

# Query specific DNS server
host example.com 8.8.8.8

# Verbose output
host -v example.com

# List all records for a zone
host -l example.com ns1.example.com

Practical Applications

  • Email Troubleshooting – Verify MX records for mail delivery
  • DNS Verification – Confirm DNS changes have propagated
  • Security Checks – Verify SPF, DKIM, DMARC records
  • Load Balancer Testing – Check multiple A records
  • IPv6 Readiness – Verify AAAA record configuration

View Documentation

Was this article helpful?