Back to blog

How to test a website on a new IP without DNS changes using curl --resolve

12/1/2025 · 1 min · Infrastructure

Share

Testing by raw IP is not enough for migration validation. You need proper Host header and TLS domain flow. curl --resolve gives you that without touching public DNS.

Correct usage

curl -skI --resolve mydomain.com:443:148.113.xxx.xxx https://mydomain.com

Pre-cutover checks

Automation snippet

code=$(curl -sk -o /dev/null -w "%{http_code}" --resolve "${DOMAIN}:443:${NEW_IP}" "https://${DOMAIN}/")

Final takeaway

curl --resolve is the safest pre-cutover validation method for domain-based hosting and TLS-aware stacks.

CC BY-NC

This post is licensed under CC BY-NC.

Comments

Join the discussion below.