by Howard B. Richman
The old way of viewing your hostgator site until you are ready to go public stopped working Dec, 2016. Here are some creative workarounds.
For years, you could build your new Hostgator site in private while your old site was still being hosted with another hosting company. Then when you are ready to switch the DNS numbers, VOILA… your new site shows up on the correct domain as it should.
But since December, 2016, they made a change that makes this very, very difficult. They say it is for security reasons, which is probably the truth but it is very frustrating for webmasters who need to prep the new version of the site while keeping the old site functional. This process is called using a “temporary URL” or “accessing the site directly via the server.”
Old Way to Access Your Website with a Temporary URL
(THE ABOVE WAY DOES NOT WORK ANY MORE UNLESS YOU DO THE FOLLOWING!!!!!)
New Way to Access Your Website with a Temporary URL
They have tutorials on their site which are cryptic and unclear and also do not give you all the correct information that you need. I actually have spent quite a bit of time interpreting their information as well as consulting with their crew and I’ve compiled what I have learned below.
- CHANGE THE HOSTS FILE. As they say from this link: http://support.hostgator.com/articles/how-do-i-change-my-hosts-file ” Changing your hosts file is a temporary measure to preview your site as it will load from your HostGator server. This lets you make changes on a server other than the one loaded by your domain when visitors access your page.” But they don’t really explain what to actually do. You have use CHROME and you have to add the VIRTUAL HOSTS plugin. (Does not work on Firefox.)
In the plugin, enter the following:
VHost Domain… put “yourdomain.com” (without http://)
VHost IP… put the IP address of the server.
- WITHIN CHROME, THEN GO TO THE FOLLOWING:
- If it doesn’t work, then you can do a DNS flush within your Chrome browser: chrome://net-internals/#dns
and then a sockets flush within your Chrome browser: chrome://net-internals/#sockets
- If it STILL doesn’t work, then you might need to do a whole computer DNS Flush
- If it STILL doesn’t work, then sometimes you just have to wait 48 hours. As illogical as this seems, that might be the solution.
- Meanwhile, if you want to continue viewing or working on your OLD site on the existing host, before you are ready to make the transfer, “yourdomain.com” will no longer work as long as you keep the virtual hosts file enabled. So if you can find out the IP address of your domain on its current server, you will be able to continue to access that if you view it as an IP address, rather than as a domain. The reason this point can be useful is that often you might wish to SIMULTANEOUSLY updating both the old and the new versions of the site and by doing this you will be able to! To make it even more foolproof, if you are viewing the new site on Chrome, then try to view the old site on Firefox, so there would be less confusion.