What is a Hosts File?
The hosts file allows your computer to map domain names to specific IP addresses locally. When you edit this file, your system will resolve the domain name to the IP you specify rather than querying public DNS. This makes it possible to view or work on a Pressable site at its final domain before updating DNS records. Note that this modification is temporary and only affects the local machine where you make the change.
This method works for any WordPress site, but it’s most commonly used for domain-based or subdomain-based multisite networks that need to be tested extensively in staging before DNS is pointed. Standard single-site installs can be previewed using the *.mystagingwebsite.com domain or a custom staging domain.
When to Use This Method
- For testing a multisite network with subdomains or mapped domains prior to DNS propagation.
- When verifying that domain mapping or redirects function correctly before DNS updates.
- For developers who want to confirm configurations using the final domain name.
Finding the Site IP Address
- Log in to the MyPressable Control Panel.
- Open the site and navigate to the Domains tab.
- Note the site’s IP address: you’ll use this in your hosts file entry. You can use either of the listed IPs.

Assign the Domain to Your Pressable Site
- Go to the Domains -> Add Domains section of the control panel
- Add the root domain (samplesite.com), Pressable will automatically add the
wwwversion as well (www.samplesite.com)
You can find more detail about assigning a domain in our full Knowledge Base article here.
Editing the Hosts File
Below are the steps for macOS, Windows, and Linux.
Be sure to replace 199.16.172.184 and samplesite.com with your site’s actual IP and domain.
macOS
- Open Terminal.
- Run:
sudo nano /etc/hosts - Add a line such as:
199.16.172.184 samplesite.com www.samplesite.com - Save (Control + O, then Enter), exit (Control + X).
- Flush DNS cache:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Visit your domain in a browser to confirm it loads from Pressable.
Windows
- Open Notepad as Administrator.
- Navigate to File > Open and select
C:\Windows\System32\drivers\etc\hosts. - Add:
199.16.172.184 samplesite.com www.samplesite.com - Save the file.
- Flush DNS cache:
ipconfig /flushdns - Visit your domain to verify it loads correctly.
Linux
- Open Terminal.
- Edit the hosts file:
sudo nano /etc/hosts - Add:
199.16.172.184 samplesite.com www.samplesite.com - Save and exit.
- Flush DNS cache (example for Ubuntu):
sudo systemd-resolve --flush-caches - Open your domain in a browser to test.
Verifying the Connection
Using Terminal Tools
Use one of the following commands to confirm your domain resolves from your local computer to the Pressable IP:
ping samplesite.com or
nslookup samplesite.com These commands will show whether your computer is using the IP address you specified in the hosts file. If it resolves correctly, the site should load from your Pressable environment when you visit it in a browser (this is the real test that everything is working).

In Browser
You can check by appending /.well-known/hosting-provider to the domain in your browser address bar. If the site is loading from Pressable, it will display a white screen with the word “Pressable” in the upper-left corner.

If the old site still appears, clear your browser cache or use a private/incognito window.
Because our SSL provider uses public DNS info to confirm a domain is hosted with Pressable before issuing a certificate it is expected behavior that you will see a security warning.
SSL will provision when DNS is updated to actually point the domain.
Reverting the Changes
Once DNS has been updated and propagated, remove or comment out the line you added to the hosts file. Keeping outdated entries can cause your system to bypass current DNS records.
Troubleshooting and Tips
- If the site doesn’t load, double-check your host file for typos or missing
wwwentries. - Ensure your firewall or proxy isn’t interfering with DNS resolution.
- Re-flush your DNS cache if changes don’t take effect.
- SSL warnings may appear if the certificate doesn’t yet match the unpointed domain (this is expected).
- Some caching or security plugins may still reference the staging domain. Clear caches or reconfigure as needed.