So you’ve migrated your website to a new server or web hosting provider and you want to view your website in the new server before pointing your DNS over?
There are generally three ways for you to achieve this:-
- Modify your computer’s host file to add a host entry for your domain to point to the new server IP.
- Create a test subdomain in the new server and point the A record for this subdomain to the new server IP.
- Ask for a temporary URL from your hosting provider.
What if there’s a better way to achieve this?
I’ve been using a service called HOSTS.CX which allows you to preview your website from a different server.
Assuming that the website has been copied or migrated over to the new server, all you need to do is to provide your website address and the new server IP in HOSTS.CX.
It will generate a custom link for you where you can preview your website from the new server instantly without any DNS or host file modifications.
What’s more, you can also share the custom link with your colleagues and clients and it’ll just work!
One thing you will want to keep in mind is the custom link generated by HOSTS.CX is public so it can be accessed by anyone who possessed the link. If you have a top secret website that you don’t want to show to the public, this may not be a suitable tool for you.