---
title: Editing Your Hosts File
description: In certain scenarios, for example, to use SiteSpect in an offline environment, you'll have to edit a file called hosts that your operating system uses to map host names to IP addresses. We provide ins
---

[Skip to content](https://doc.sitespect.com/knowledge/editing-your-hosts-file#main-content)

English

Show submenu for translations

![Monetate-Logo-Full-Color-1](https://doc.sitespect.com/hs-fs/hubfs/Monetate-Logo-Full-Color-1.png?width=340&height=49&name=Monetate-Logo-Full-Color-1.png)

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)

Open main navigation

Close main navigation

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)
- English
  
  Show submenu for translations

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://doc.sitespect.com/knowledge?hsLang=en)
2. [Site](https://doc.sitespect.com/knowledge/site?hsLang=en)

# Editing Your Hosts File

In certain scenarios, for example, to use SiteSpect in an offline environment, you'll have to edit a file called hosts that your operating system uses to map host names to IP addresses. We provide instructions here for both [Windows](https://doc.sitespect.com/knowledge/editing-your-hosts-file) and [Mac](https://doc.sitespect.com/knowledge/editing-your-hosts-file).

#### Windows

You must edit the hosts file as administrator, otherwise your changes won't take effect. To do so:

1. Locate **Notepad**.
2. Right click on it and select **Run as Administrator**. You may be asked to enter your credentials.

![Editing Your Hosts File - Windows](https://doc.sitespect.com/hs-fs/hubfs/Kbase%20Images/Editing%20Your%20Hosts%20File%20-%20Windows.png?width=263&name=Editing%20Your%20Hosts%20File%20-%20Windows.png)

1. Open C:\\windows\\system32\\drivers\\etc\\hosts.
2. Switch to SiteSpect and select **Site**, **Configuration**, **Domains**.
3. In the lower left corner of the Domains list, click **Get Hosts File Entries**. SiteSpect displays a small window with hosts file entries for your Domains.

![Editing Your Hosts File - Get Hosts File Entries](https://doc.sitespect.com/hs-fs/hubfs/Kbase%20Images/Editing%20Your%20Hosts%20File%20-%20Get%20Hosts%20File%20Entries.png?width=434&name=Editing%20Your%20Hosts%20File%20-%20Get%20Hosts%20File%20Entries.png)

1. Copy these entries.
2. Switch back to Notepad and paste the entries you just copied into your hosts file.
3. Save your hosts file.
4. Open a Command Prompt window. In Windows 10, click the Windows icon in the lower left and launch Command Prompt under Windows System in the list of programs.
5. In the Command Prompt window, type the following to clear the DNS cache on your computer:

ipconfig /flushdns  
 

![Editing Your Hosts File - Command Prompt](https://doc.sitespect.com/hs-fs/hubfs/Kbase%20Images/Editing%20Your%20Hosts%20File%20-%20Command%20Prompt.png?width=500&name=Editing%20Your%20Hosts%20File%20-%20Command%20Prompt.png)

1. In SiteSpect, Preview a Variation Group: select **Campaigns**, select a **Status**, select a **Campaign**, open a **Variation Group**, click **Preview**. Your site opens in the SiteSpect Preview window.

![Editing Your Hosts File - Clothing Co](https://doc.sitespect.com/hs-fs/hubfs/Kbase%20Images/Editing%20Your%20Hosts%20File%20-%20Clothing%20Co.png?width=688&name=Editing%20Your%20Hosts%20File%20-%20Clothing%20Co.png)

#### Mac

These instructions use the Terminal application to edit the hosts file.

1. Open a **Finder** window and select **Applications** from the sidebar.
2. Open **Utilities** and then open **Terminal**.
3. In the Terminal window, open the **Nano** text editor, which requires your administrator password.

- Type sudo nano /etc/hosts and press return.
- Enter your administrator password and then press return.

1. Switch to SiteSpect and select **Site**, **Configuration**, **Domains**.
2. In the lower left corner of the Domains list, click **Get Hosts File Entries**. SiteSpect displays a small window with hosts file entries for your Domains.

![Editing Your Hosts File - Mac](https://doc.sitespect.com/hs-fs/hubfs/Kbase%20Images/Editing%20Your%20Hosts%20File%20-%20Mac.png?width=434&name=Editing%20Your%20Hosts%20File%20-%20Mac.png)

1. In the Terminal window, add these entries to your hosts file.
2. When you're done, press **Control + O** to save the file and press **Enter**. Then press **Control + X** to exit Nano.
3. In the Terminal window, type sudo killall -HUP mDNSResponder and press return. That clears the DNS cache on your computer.
4. In SiteSpect, Preview a Variation Group: select **Campaigns**, select a **Status**, select a **Campaign**, open a **Variation Group**, click **Preview**. Your site opens in the SiteSpect Preview window.

![Editing Your Hosts File - Mac Clothing Co](https://doc.sitespect.com/hs-fs/hubfs/Kbase%20Images/Editing%20Your%20Hosts%20File%20-%20Mac%20Clothing%20Co.png?width=688&name=Editing%20Your%20Hosts%20File%20-%20Mac%20Clothing%20Co.png)

 

- [Get Started](https://doc.sitespect.com/knowledge/get-started?hsLang=en#main-content)

    - [SiteSpect Support](https://doc.sitespect.com/knowledge/get-started?hsLang=en#sitespect-support)
    - [Overview Information](https://doc.sitespect.com/knowledge/get-started?hsLang=en#overview-information)
    - [Intro to SiteSpect](https://doc.sitespect.com/knowledge/get-started?hsLang=en#intro-to-sitespect)
    - [Account Setup](https://doc.sitespect.com/knowledge/get-started?hsLang=en#account-setup)
    - [Artificial Intelligence](https://doc.sitespect.com/knowledge/get-started?hsLang=en#artificial-intelligence)
- [Dashboard](https://doc.sitespect.com/knowledge/dashboard?hsLang=en)
- [Build](https://doc.sitespect.com/knowledge/build?hsLang=en#main-content)

    - [Setting Up a Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#setting-up-a-campaign)
    - [Create a Client-Side Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#create-a-client-side-campaign)
    - [Create a Server-Side Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#create-a-server-side-campaign)
    - [Metrics](https://doc.sitespect.com/knowledge/build?hsLang=en#metrics)
    - [Audiences](https://doc.sitespect.com/knowledge/build?hsLang=en#audiences)
    - [Triggers](https://doc.sitespect.com/knowledge/build?hsLang=en#triggers)
    - [Variations](https://doc.sitespect.com/knowledge/build?hsLang=en#variations)
    - [Traffic Management](https://doc.sitespect.com/knowledge/build?hsLang=en#traffic-management)
    - [Preview](https://doc.sitespect.com/knowledge/build?hsLang=en#preview)
    - [Factors](https://doc.sitespect.com/knowledge/build?hsLang=en#factors)
    - [Advanced Settings](https://doc.sitespect.com/knowledge/build?hsLang=en#advanced-settings)
    - [Omnichannel](https://doc.sitespect.com/knowledge/build?hsLang=en#omnichannel)
    - [Regular Expressions (Regex)](https://doc.sitespect.com/knowledge/build?hsLang=en#regular-expressions-regex)
    - [WATTS](https://doc.sitespect.com/knowledge/build?hsLang=en#watts)
    - [Recommendations](https://doc.sitespect.com/knowledge/build?hsLang=en#recommendations)
- [Monitor](https://doc.sitespect.com/knowledge/monitor?hsLang=en)
- [Analyze](https://doc.sitespect.com/knowledge/analyze?hsLang=en#main-content)

    - [Data Export and Integration](https://doc.sitespect.com/knowledge/analyze?hsLang=en#data-export-and-integration)
    - [SiteSpect Reports](https://doc.sitespect.com/knowledge/analyze?hsLang=en#sitespect-reports)
- [Site](https://doc.sitespect.com/knowledge/site?hsLang=en#main-content)

    - [Tools](https://doc.sitespect.com/knowledge/site?hsLang=en#tools)
    - [Configuration](https://doc.sitespect.com/knowledge/site?hsLang=en#configuration)
- [Developers](https://doc.sitespect.com/knowledge/developers?hsLang=en#main-content)

    - [API Reference](https://doc.sitespect.com/knowledge/developers?hsLang=en#api-reference)
    - [Code Samples](https://doc.sitespect.com/knowledge/developers?hsLang=en#code-samples)
    - [Tips & Tricks](https://doc.sitespect.com/knowledge/developers?hsLang=en#tips-tricks)
- [Mobile](https://doc.sitespect.com/knowledge/mobile?hsLang=en)
- [Implementation, Deployment, and Security](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#main-content)

    - [How does SiteSpect work with CDNs?](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#how-does-sitespect-work-with-cdns)
    - [Single Tenant Implementations](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#single-tenant-implementations)
    - [Security Features](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#security-features)
    - [Deployment and Implementation Overview](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#deployment-and-implementation-overview)
    - [SiteSpect Engine & Admin API](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#sitespect-engine-admin-api)
- [Third-Party Integration](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#main-content)

    - [Google](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#google)
    - [Zuko](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#zuko)
- [Troubleshooting](https://doc.sitespect.com/knowledge/troubleshooting?hsLang=en)
- [Releases](https://doc.sitespect.com/knowledge/releases?hsLang=en#main-content)

    - [Superfresh](https://doc.sitespect.com/knowledge/releases?hsLang=en#superfresh)
- [Feedback](https://doc.sitespect.com/knowledge/feedback?hsLang=en)

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)

[![Monetate-Logo-Full-Color-1](https://doc.sitespect.com/hs-fs/hubfs/Monetate-Logo-Full-Color-1.png?width=200&height=29&name=Monetate-Logo-Full-Color-1.png "Monetate-Logo-Full-Color-1")](http://monetate.com)

<https://www.facebook.com/> <https://www.twitter.com/> <https://www.instagram.com/> <https://podcasts.apple.com/> [mailto:email@email.com](mailto:email@email.com)

Copyright © 2026, Monetate