0

I am migrating from old hosting right now to a new one. My DNS records currently point to the old server.

I want to test how do the new server works, but as far as DNS records pointing to the old one, there is only one option to get a response is to send a raw HTTP request directly to the new server bypassing DNS resolution.

Is it possible to do this ? I am looking for some software that will be able to do this.

Could you suggest any tools ?

  • 3
    Put the new IP address in your hosts file. – Michael Hampton Feb 7 '18 at 20:18
2

You can bypass DNS lookups by adding an entry to the hosts file.

You would want to add

192.0.2.6  www.example.com

Where 192.0.2.6 and www.example.com should be replaced by the new server's IP address and the hostname respectively.

| improve this answer | |
2

You can also use curl to make HTTP requests to an IP address with a hostname like this:

curl --resolve www.example.com:80:192.168.100.100 http://www.example.com

This tells CURL to connect to 192.168.100.100:80 when connecting to http://www.example.com

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.