How to Preview Your Migrated Site Before Changing DNS

Test your website on NairoHost using a temporary URL or hosts file before pointing your domain, so you go live only when everything works.

· Updated · 1,043 views

Never switch your domain to a new host until you have confirmed the migrated site works. There are two reliable ways to preview it first.

Method 1: Edit Your Hosts File (Recommended)

This tricks only your computer into seeing the new server, while the rest of the world still sees the old one.

  1. Find your NairoHost server IP in cPanel under Server Information
  2. Edit your computer's hosts file:
    • Windows: C:\Windows\System32\drivers\etc\hosts
    • Mac/Linux: /etc/hosts
  3. Add a line: 123.123.123.123 yourdomain.com www.yourdomain.com
  4. Save and reload the site in your browser

You now see the NairoHost copy at your real domain, so links and the database work exactly as they will after go-live.

Method 2: Temporary URL

Some setups offer a preview link such as serverip/~username. This works for static sites but often breaks WordPress links, so the hosts file method is preferred for dynamic sites.

What to Test

  • Home page and key inner pages load
  • Images and CSS appear correctly
  • Contact forms submit
  • Login and, for stores, a test checkout work
  • No SSL or mixed-content warnings

After Testing

When everything looks right, remove the hosts file line and update your nameservers to NairoHost. Because the site is already verified, the DNS switch is seamless.

Tip: Run AutoSSL on NairoHost before go-live so the certificate is ready the moment DNS points to us.

Was this article helpful?

Your feedback helps us improve our documentation.

Still Need Help?

Our support team is available 24/7 to assist you.