Page 1 of 1

hosts and dns

Posted: Fri Sep 04, 2009 4:41 am
by matthijs
I have a website which is going to be moved from server to server. So the site is now http://www.example.com
The new package is set up at the server with, say, IP 12.345.678.123

The webhost told me to change my hosts file on my computer and add a line
12.345.678.123 example.com
I did that but nothing happens. When does that take effect? Is a computer restart needed?

And wouldn't it be possible to access the new server directly, through
http://12.345.678.123
That doesn't work right now, even though I expected it to, since FTP-ing to the same IP does work

Re: hosts and dns

Posted: Fri Sep 04, 2009 9:55 am
by matthijs
Ok figured it out. Restart is not needed, but I had to be specific:
example.com is not the same as http://www.example.com

Re: hosts and dns

Posted: Fri Sep 04, 2009 2:20 pm
by Doug G
You should be able to access your website via IP unless the server is using named virtual hosts.

And just a reminder, editing your hosts file on your computer will not help any other users trying to visit your site.

Re: hosts and dns

Posted: Fri Sep 04, 2009 3:00 pm
by matthijs
Doug G wrote:You should be able to access your website via IP unless the server is using named virtual hosts.
In this case I could not visit the site by IP, so I guess named virtual hosts are used.
Doug G wrote:And just a reminder, editing your hosts file on your computer will not help any other users trying to visit your site.
Yes of course. I just want to make sure the moved site works before I let the webhost provider switch the DNS