Skip to content

Instantly share code, notes, and snippets.

@paulogdm
Last active April 16, 2022 06:37
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save paulogdm/93cf32684383a42fa1414649271c9c7a 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