Skip to content

Instantly share code, notes, and snippets.

@naserjr23
Forked from paulogdm/script.sh
Created January 8, 2026 07:13
Show Gist options
  • Select an option

  • Save naserjr23/720d1c5bfb8c14bb94cf693c9d5f08f3 to your computer and use it in GitHub Desktop.

Select an option

Save naserjr23/720d1c5bfb8c14bb94cf693c9d5f08f3 to your computer and use it in GitHub Desktop.
Useful `dig` and `curl` commands
# Query any record
dig A paulogdm.com
dig NS paulogdm.com
dig CNAME www.paulogdm.com
# Query any record using a specific DNS resolver
dig A paulogdm.com @1.1.1.1
dig A paulogdm.com @8.8.8.8
# Query record with a trace of the DNS resolution
dig NS paulogdm.com @1.1.1.1 +trace
# Get headers
curl https://paulogdm.com -I
# Get a specific header
curl https://paulogdm.com -I | grep etag
# Make a POST request
curl -d '{"key1":"value1"}' -H "Content-Type: application/json" -X POST http://paulogdm.com/api
# Check if SSL is working as expected from the Vercel server
# Useful for "Zero Downtime" migrations.
curl https://paulogdm.com --resolve paulogdm.com:443:76.76.21.21 -I
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment