Back to commands

Hosting Operations

Read-only

Check a Domain A Record

You need to see the IPv4 address a domain currently resolves to.

Command

dig +short example.com A

Before you run this

System impact: Read-only. Low when scoped to the shown target.

When not to use it: Do not assume one resolver represents every user during DNS propagation.

Expected output

One or more IPv4 addresses.

System impact

Read-only. Nothing changes. The command queries DNS.

Recovery / rollback: no state is changed.

When to use it

Use this during DNS cutovers, migrations, and stale resolver debugging.

When not to use it

Do not assume one resolver represents every user during DNS propagation.

next steps

Related commands

Linux Survival Basics Read-only

Check Domain A Records

A renewal can fail because DNS points elsewhere.

dig +short example.com A
Hosting Operations Read-only

Check the Nginx Site Symlink Target

Verify which release or document root symlink Nginx is serving before changing deploy links.

readlink -f /srv/www/example.com/current
Hosting Operations Read-only

Check HTTP to HTTPS Redirect

HTTPS worked. The plain HTTP redirect still mattered.

curl -I http://example.com
Web Server Rescue Read-only

Compare Authoritative Nameserver Answers

The recursive resolver was not the problem. One nameserver disagreed.

for ns in $(dig +short NS example.com); do printf '%s ' "$ns"; dig @"$ns" +short example.com A; done
Hosting Operations Can be slow

Find Feed Links Missing from the Sitemap

Your feed can advertise URLs that the sitemap never lists.

grep -o '<link>https://example.com/[^<]*</link>' public/feed.xml | sed 's#<link>##;s#</link>##' | while read -r url; do grep -q "$url" public/sitemap.xml || echo "$url"; done
Study mapping

Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.