Simple list of ways to test a website from different servers.
- Sick of editing your hosts file?
- Need to compare 2 versions of your website on different servers?
- Want to see a website function live from a domain of your choice?
Well here are some ways to get the job done.
1. Hosts preview site
There are many sites offering this server:
- skipdns.link
- hosts.cx (no longer working)
- In case you ever forget these sites, search “website hosts preview” on Google.
2. GasMask
Install an app on your OS X desktop computer, and manage your hosts file with many more options. (Thanks Sridhar for this recommendation!)
- GasMask GitHub link
- Download link above doesn’t work so you’ll have to find another one elsewhere.
- When using this, don’t forget to edit preferences and shorten the update interval time.
3. Edit your local computer hosts file
Simply add a line to it, with the IP and then the domain. (Basically tells your computer to look for the domain at exactly that IP instead of doing a DNS-lookup over the web.) I highly don’t recommend this method as it’s annoying. But it’s the old school way people used to do manually.
- MAC –
/etc/hosts
- WINDOWS –
c:\windows\system32\drivers\etc\hosts
Sebastian
If you use something like skipdns.link how do you prevent WordPress autoredirect to login?
I think I keep Editing my Hosts file as it’s more reliable.
Thanks I might use it for sharing the site though.
Johnny
I was able to get into WP admin just fine. But anyway if you like editing your local hosts file, you can try the GasMask desktop app.
Sebastian
Thanks nano is my editor of choice 🙂
Johnny
Hahaha
Denny
There’s also this one: https://github.com/specialunderwear/Hosts.prefpane
Johnny
Ooooh, this is probably most perfect for how I like to do it. Thank you for the suggestion!!!
Tom Robak
On mac I love this one (iHosts) – creating lists of hosts etc is very useful for dev
https://apps.apple.com/app/id1102004240?mt=12
Johnny
Thank you for this suggestion as well! This is why I love blogging and getting outside tips. You’re perfect, man!
Don
We are experiencing problems with both hosts.cx and skipdns.link over the past few weeks since mid-October 2021. At first I thought an issue with new browser versions and updated security for referrers, etc, but I’ve tested on older browsers as well and the problem persists, which is… for hosts.cx , no preview link is generated, and for skipdns.link , the preview link redirects to the DNS of the domain and *not* the IP specified in the tool. Anyone else experiencing this?
Sascha
Yes, hosts.cx is dysfunctional from my point of view.
But skipdns.link is working fine from here.
Don
I should have replied back here since my comment above. The developer of skipdns.link fixed the issue, and yes it is working fine again. My favorite tool, as customers can easily create preview links themselves, given simple instructions.
Shuki Vaknin
Hey,
I made a similar tool, that uses different methods. if you would like to add to your list here that would be nice:
https://hosts.click/
John @ S4
On Windows, I use Hosts File Editor – https://github.com/scottlerch/HostsFileEditor
It hasn’t been updated for years but it works perfectly well.
Johnny
Oooooh. Thanks for this. I haven’t touched my Windows desktop machine for a while but will install it when I do.