-6

in order to migrate my domain name to my new server, I would like to test it with real domain name.

I think we can call Ip server giving as argument domain name ?

How can I do that ?

Something like that :

IP ADRESS + Domain name as argument ------> Server getting domain name in HTTP_HOST $_SERVER

Thank you !

Edit : I would like it with web browser maybe with addon

shadeoner
  • 1
  • 2

2 Answers2

3

Use telnet:

telnet <ip> 80
GET / HTTP/1.1
HOST: example.com 
<return>

It should return a 200 return code and your / document for the site example.com.

Sven
  • 98,649
  • 14
  • 180
  • 226
2

Just add the IP address and the host name (separated by a space or tab) in the hosts file (/etc/hosts on Linux, %windir%\system32\drivers\etc\hosts on Windows). Any application of the system (including your browser) will then use that IP address when you use the specified host name.

Ale
  • 1,703
  • 17
  • 25