Question about DNS and hosts

Hello

I'm new here. Please go easy on me xD

I've followed VPS guide on here and mostly on guvnr.com. I've setup my server with nginx. But since I'm not done with the server I didn't change my domain nameservers yet. So my site is still running at the old host.

I want to test my site on my linode first before I move. So I added my site to my windows xp hosts file: (windows\system32\drivers\etc\HOSTS)

69.164.xx.xx www.mydomain.com

127.0.0.1 localhost

So that my browser send me to the new server. But it goes to my old server instead.

I tested HOSTS file to see if it is working at all, and instead of my Linode IP address, I entered Yahoo! IP address:

69.147.76.15 www.mydomain.com

127.0.0.1 localhost

and it worked. By entering my site URL, I got Yahoo! page.

So I guess my Linode IP is somehow redirecting me back to my old [running] server?

Another thing is, since I haven't changed nameservers, I couldn't reverse DNS.

By 'hostname -f' on my CLI, I get:

mail.mydomain.com

But the Hostname Lookup couldn't find it since mail.mydomain.com is still pointing to the old server IP.

So to sum up, I'm asking how to test my site on my new server without having to change my domain nameservers?

Thanks for your attention

2 Replies

Not sure what is happening with your hostname, that is a bit odd. Quick solution though - try setting up a subdomain. Usually relatively quick to update, and then you can setup / test your Linode using something like test.mydomain.com

It doesn't explain why it works with Yahoo's IP and not yours, but try flushing your DNS cache:

ipconfig /flushdns

from a command line.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct