hosts and dns

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

hosts and dns

Post 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
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: hosts and dns

Post 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
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

Re: hosts and dns

Post 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.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: hosts and dns

Post 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
Post Reply