dig +short A example.com

Category: Web Servers & Proxies

dig +short A example.com

Look up the IPv4 address for a domain

+short trims dig's verbose output to just the answer, here the A records (IPv4 addresses) for example.com. Handy for confirming DNS points at the right server before you switch traffic. Use AAAA for IPv6 and CNAME to trace aliases.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.