↑ ↓ select, Enter open, Esc close

Test a website on a new server before the DNS change

Adjust the values, the command updates live
user@server
curl -sSI --resolve example.com:443:203.0.113.10 https://example.com/

With --resolve, curl connects directly to the given IP for this domain and port but still sends the correct hostname and SNI. This lets you check the website and SSL certificate on the new server before switching DNS. Without -I, the full page content is loaded.

Note: For redirects to another domain, for example with www, normal DNS is used again. In that case, specify both names with one --resolve each.

Also searched as

  • test website before dns propagation
  • curl resolve to specific ip
  • check site on new server without hosts file

Related one-liners

All in Network

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.