August 22nd, 2013, 08:40 AM
Cannot point hostname to new ip
I bought a new VPS and I need to move a website to that VPS. I want to test it before going live. I haven't installed nothing yet, just Apache.
Under Linux, the /etc/hosts file can be used to override dns definitions, i.e. to point an hostname to a different ip.
I added a line in the /etc/hosts file:
188.8.131.52 URL (address blocked)
I flushed all caches and went to (URL address blocked) , but it still shows the old site.
I used ping to test the ip and it shows the new ip.
I used wget to retrieve the index.html file, but it retrieves the file from the old server.
I bypassed my router to check if itís something related with it, but it isn't.
I booted Windows 7 and edited the hosts file and saw the same behaviour, so it's not related to the OS.
If instead I add:
184.108.40.206 forums.devshed.com devshed.com
I still see this website.
Why can't I point a hostname to a new IP ? Is there another way to do it?
Thanks for your help!