Note: If you set up your domain the way described on using a custom domain name then please ignore this page — it doesn't apply to you :)
Here's the process for testing IP address (and DNS) changes and then making them.
Example:
old IP address: 207.7.145.200
New IP address: 209.237.247.200
They're similar (both end in .200), but not the same.
On a *nix machine, you can test a given site by editing /etc/hosts ("sudo vi /etc/hosts") so that it contains a line like this:
209.237.247.200 www.daviswiki.org daviswiki.org
(The IP address on the left is the one that you want to point the hostname(s) on the right to, irrespective of what DNS lookups say.)
On the Mac, you can make those changes take effect by doing this:
-
Quit the web browser you intend to test with
-
sudo kill -HUP `ps -aux | egrep \/usr\/sbin\/lookupd | egrep -v egrep | awk '{print $2}'`
-
If the aforementioned command gives you trouble or makes you nervous, you can reboot instead.
-
Open the web browser you intend to test with
On Linux, you may need to restart nscd - not sure. You'll probably still need to quit & restart the web browser.
(Keep in mind that doing this won't affect output from tools like 'host' and 'dig' that actually do perform DNS lookups. Changing /etc/hosts will only affect software that honors the typical system-wide settings to first look at /etc/hosts and then perform DNS lookups if the answer isn't in /etc/hosts.)
Then, using the web browser, see if you can visit the site(s) in question. If so, use this command:
'netstat -n | egrep 209.237.247.200.*80'
to verify while loading a busy page (recent_changes, maybe). If it's working, and you launched netstat soon enough after your HTTP requests, you should see at least one connection with state "ESTABLISHED" or "CLOSE_WAIT".
If that goes well, then you can safely change the IP address in DNS via the EveryDNS portal or whatever tool your authoritative DNS provider makes available. It'll take a day or four for the changes to propagate, so best to start sooner rather than later.
Be sure to remove the unnecessary cruft from /etc/hosts when you're done, lest you confuse yourself later.