Get a free website with any plan

See how
HOSTING

Previewing your site before the DNS switch (hosts-file trick)

IN SHORT

Flashcloud lets you preview your migrated site before the DNS switch by editing your computer's hosts file to point your domain at your Flashcloud server's IP. Only your machine sees the change, so your live site keeps serving everyone else until you're ready.

You can see exactly how your site will look on Flashcloud before any visitor does, and before your domain's DNS points here. Edit the hosts file on your own computer to temporarily point your domain at your Flashcloud server's IP address. Only your machine sees the change, your live site keeps serving everyone else, and once you're happy you flip DNS for real.

This is the standard way to preview a migrated site. It's also exactly what our team does behind the scenes during a Free Transfer: they build the site on our servers, hand you a way to check it, then cut DNS over once you approve.

Find your server IP

Sign in to the portal, go to Services, and click your hosting service. The server's IP address is listed on the overview page. Copy it.

If you're mid-migration and files haven't landed yet, upload them first. See Uploading files to your hosting for the portal file manager, FTP, and Git deployment options.

Edit the hosts file on Mac

  1. Open Terminal.
  2. Run sudo nano /etc/hosts and enter your Mac password when prompted.
  3. Add a new line at the bottom: 203.0.113.10 yourdomain.com (replace with your actual IP and domain). Add a second line for www.yourdomain.com if you use the www version.
  4. Save with Control+O, then Enter, then exit with Control+X.
  5. Flush the DNS cache: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.

Edit the hosts file on Windows

  1. Open Notepad as Administrator (right-click Notepad, Run as administrator).
  2. Open C:\Windows\System32\drivers\etc\hosts.
  3. Add a new line at the bottom: 203.0.113.10 yourdomain.com, plus a www line if needed.
  4. Save the file. Notepad will let you overwrite it since it's running elevated.
  5. Flush the DNS cache: open Command Prompt and run ipconfig /flushdns.

Test the site

Open a browser and visit https://yourdomain.com. You should see the version hosted on Flashcloud, not your old host. A few things to check while you're in there:

  • Pages load and internal links work, including anything behind a login.
  • Forms submit correctly, since some forms hardcode the old server's URL.
  • Images, CSS, and fonts all load, since these can 404 if paths reference the old domain.
  • SSL loads without a warning. If you just moved the site and haven't pointed DNS here yet, your Let's Encrypt certificate may not have issued yet, since certificate issuance depends on DNS resolving to us first. Check back after the cutover if you see a certificate warning during this preview stage.

If something needs a login-protected staging area instead of a full preview, password-protecting a directory is a good complementary tool for gating a subfolder off from public eyes while you work.

WordPress sites need one more step

If your site is WordPress, the site URL and home URL are stored in the database, so the hosts-file trick alone might redirect you back to the old host or produce broken asset paths. See Migrating your WordPress site to Flashcloud for how the URLs get updated during a proper migration, whether you use our Free Transfer, a migration plugin, or a manual move.

Clean up after cutover

Once your domain's DNS actually points to Flashcloud and you've confirmed the live site is correct, go back into the hosts file and delete the lines you added. Leaving them in place means your computer will keep showing the Flashcloud copy directly by IP even after future changes, which gets confusing if you ever troubleshoot DNS again.

When to contact support

If the site doesn't load correctly during preview, if SSL still won't issue a few minutes after DNS is actually live, or if you're not sure which IP to use, open a ticket from Support > New ticket in the portal, or use live chat. A real person will help, and if you're going through a Free Transfer, your migration specialist is already on the ticket and can confirm the server details directly.

Common questions

Will other visitors see my site change while I'm previewing it?

No. The hosts-file edit only affects your own computer. Everyone else still sees your site on the old host until you actually switch DNS.

Why am I getting an SSL warning during the preview?

Your Let's Encrypt certificate likely hasn't issued yet, since certificate issuance depends on DNS actually resolving to Flashcloud. Check back after you cut over DNS.

Why does my WordPress site redirect back to the old host during preview?

WordPress stores the site URL and home URL in the database, so the hosts-file trick alone isn't enough. See the guide on migrating your WordPress site to Flashcloud for how those URLs get updated properly.

Where do I find the IP address to put in the hosts file?

Sign in to the portal, go to Services, click your hosting service, and copy the IP address from the overview page.

Do I need to remove the hosts file entries after I switch DNS?

Yes. Once DNS points to Flashcloud and you've confirmed the live site is correct, delete the lines you added, or your computer will keep showing the Flashcloud copy directly by IP even after future DNS changes.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.