0

I'm on my localhost PC. I need to add an entry that maps our public site to our dev server.

I tried several things with no luck:

192.168.1.40 oursite.com // where the IP here is our internal dev server or devserver oursite.com oursite.com devserver

I'm not sure what I'm doing wrong here.

WeDoTDD.com
  • 245
  • 2
  • 5
  • 14

2 Answers2

2

HI Coffee,

For the sake of being thorough, the "// where the IP here is our internal...etc." is not in the actual hosts file right?

Not sure if you are doing this already, but you you should ping "oursite.com" after adding that line in your hostfile, if it responds from 192.168.1.40 you know the hosts file is working and perhaps its a host header or other webserver issue that preventing it from displaying in your browser.

Cheers, iain

iainlbc
  • 2,694
  • 19
  • 19
2

Remember that oursite.com is different than www.oursite.com, so make sure to include the full domain name in the host file. Also your browser and OS will cache dns responses, so you may need to clear the browser cache and run ipconfig -flushdns on the command line before the host file response starts working.

Greg Bray
  • 5,610
  • 5
  • 36
  • 53
  • I just don't know which above that I tried is the correct syntax. Thanks. – WeDoTDD.com Apr 26 '10 at 02:37
  • is it IP space domain name where IP is the Ip you want to point the domain name to? – WeDoTDD.com Apr 26 '10 at 02:37
  • Yes.. IP then space or tab then domain name. See http://www.youtube.com/watch?v=U-N9cryU_fQ – Greg Bray Apr 26 '10 at 16:59
  • Nice. I did not realize we registered our domain name with www or without the www and that made all the difference when specifying it in the hosts file...it has to be the one you registered...include or not to include the www is where the problem lied. – WeDoTDD.com May 21 '10 at 16:30
  • 1
    Just fyi you still register oursite.com, but in terms of DNS and Host files `www.oursite.com` is different than `oursite.com`. Most people have them point to the same IP address or have one be a CNAME of the other, but just remember that they are not the same thing and the host file needs either entries for both or just one entry for whichever version you type into your browers. – Greg Bray May 21 '10 at 16:43