How can I preview a site on its live domain?

When preparing a site for launch, it can often be useful to test the site on the Flywheel server and live domain prior to making any DNS changes. This is possible by editing your hosts file. Editing your hosts file allows you to point a domain to a specific IP address on your personal computer only. In particular, this method is often used when testing large multisites, as it’s far less error prone than swapping to temporary domains throughout your entire database.


Hey there! This help doc should be approached with caution. Only make changes to your hosts file if we’ve told you to make those changes or if you’re absolutely sure this is what you’re supposed to be doing.

Locate your hosts file

All operating systems have a way to accomplish this task, but the process  and syntax is slightly different in each OS. You can find instructions below for specific operating systems.



Modify your hosts file

When you’ve located your hosts file, you’ll need to add at least two pieces of information: the IP address you want the site to resolve to and the domain. For example, adding the below two lines will point and to the IP address You’ll obviously want to add your live site’s domain name, and the IP address of your new Flywheel server. These entries are separated in your hosts file only by a single space.

Flywheel IP Address Your domain name



Set your primary domain in Flywheel

Once you’ve modified your hosts file, you’ll need to prepare your Flywheel site to work with the domain you added to your hosts file. You can learn about setting your Primary domain name here. Make sure you add the domain exactly as you added it to your hosts file previously – they should match.


Save and test

Once you’ve added the proper domain and IP information as noted above, you can save the file and visit the domain in your browser. It should now load like normal, but from the Flywheel server – not your current host. Once you’ve completed your testing, you should remove these modifications from your hosts file.


These changes only affect your local computer – not any visitors over the internet.

Instructions for editing your hosts file popular operating systems

You can find direct instructions on how to modify your hosts file on various popular operating systems at this link.

Was this article helpful?

  • Frequently Asked

    The most commonly asked questions, and a few we just think you should know.

    26 Articles
  • General Questions

    Questions that don't fit elsewhere, or those about Flywheel in general.

    59 Articles
  • Getting started

    Everything you need to know to get your first Flywheel site up and running.

    16 Articles
  • Domain Names

    Details about how to manage DNS and point your domain names at Flywheel.

    13 Articles
  • Billing & Accounts

    Questions relating to payments, billing and managing your account on Flywheel.

    13 Articles
  • Blueprints

    Learn everything there is to know about what Blueprints are, how to create them and how to make the best use of them.

    5 Articles
  • Database

    How to access your WordPress database to make changes and update content.

    3 Articles
  • Local by Flywheel

    Everything you need to know about our amazing, free local WordPress development software for Mac and PC.

    6 Articles
  • Organizations

    Everything you need to know about managing your team with our Organizations feature.

    8 Articles
  • Plugins

    Which plugins work best, which plugins work worst, and everything in between.

    7 Articles
  • Security

    Details about everything Flywheel does to makes your site so secure.

    13 Articles
  • SFTP

    Information on setting up and troubleshooting with SFTP connections and file transfers.

    4 Articles
  • Simple SSL

    All there is to know about our free, automatically installed and activated SSL certificates.

    9 Articles
  • Staging

    How to get the most out of Staging, which allows you to duplicate a site, make changes, and then push those changes to the live site.

    7 Articles
  • White Label

    Everything you need to know about our Whitelabel subscriptions for branding and reselling Flywheel.

    4 Articles

Flywheel help

Help is just a click away! Log into the Flywheel dashboard to instantly chat with an expert, open a ticket, or follow along with in-depth documentation. We happily offer support 24 hours a day, 7 days a week, 365 days a year!

Log in
WordPress experts

Try it yourself. It's free & takes less than 60 seconds. Sign up

[if lte IE 8]
[if lte IE 8]