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.
Before you begin, you’ll need to verify your domain using a text record (TXT record).
A TXT record is used to verify that you own and control your domain, and prevents unauthorized use of it.
Follow these steps to verify your domain:
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 here for specific operating systems.
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 www.domain.com and domain.com to the IP address 173.255.230.60. 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 |
174.255.230.60 | www.domain.com |
174.255.230.60 | domain.com |
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.
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.
If you have any questions our Happiness Engineers are here to help!
New to Flywheel? Start here, we've got all the information you'll need to get started and launch your first site!
View allLearn all about managing your Flywheel user account, Teams and integrations.
View allFlywheel hosting plans include a ton of great features. Learn about how to get a free SSL certificate, set up a staging site, and more!
View allAll the server and setting info you'll need to help you get the most out of your Flywheel hosting plan!
View allTips and tricks for managing your sites on Flywheel, including going live, troubleshooting issues and migrating or cloning sites.
View allLearn more about Growth Suite, our all-in-one solution for freelancers and agencies to grow more quickly and predictably.
Getting started with Growth Suite
Growth Suite: What are invoice statuses?
Growth Suite: What do client emails look like?
Learn more about Managed Plugin Updates, and how you can keep your sites up to date, and extra safe.
Restoring Plugin and Theme Management on Flywheel
Managed Plugin Updates: Database upgrades
Managed Plugin Updates: Pause plugin updates
We can help! Check out our Brand Resources page for links to all of our brand assets.
Brand Resources