---
title: "How do I edit the hosts file for Verax Protect?"
slug: "editing-the-hosts-file-for-verax-protect"
updated: 2026-05-11T18:23:13Z
published: 2026-05-11T18:23:13Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verax.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How do I edit the hosts file for Verax Protect?

In some deployments, Verax Protect requires redirecting AI tool domains to the Verax server using the system hosts file.

⚠️ Editing the hosts file requires administrator/root privileges.

Before proceeding, retrieve the required domain mappings from:

**Verax Console → Settings → Traffic Redirect → Web Proxy**

Copy the entries exactly as shown in your console.

---

## Windows

### Hosts File Location

```plaintext
C:\Windows\System32\drivers\etc\hosts
```

---

### Step 1 – Open Notepad as Administrator

1. Click **Start**
2. Type **Notepad**
3. Right-click **Notepad**
4. Select **Run as administrator**
5. Click **Yes** on the UAC prompt

---

### Step 2 – Open the Hosts File

1. In Notepad, click **File → Open**
2. Navigate to:

```plaintext
C:\Windows\System32\drivers\etc\
```

1. In the bottom-right dropdown, change:
  - **Text Documents (*.txt)** → **All Files**
2. Select the file named **hosts**
3. Click **Open**

---

### Step 3 – Add Verax Entries

Scroll to the bottom of the file and paste the entries copied from:

**Verax Console → Settings → Traffic Redirect → Web Proxy**

Do not modify the domain names unless instructed.

---

### Step 4 – Save the File

Click **File → Save**

If you receive a permission error, ensure Notepad was opened as Administrator.

---

### Step 5 – Flush DNS Cache (Recommended)

Open **Command Prompt as Administrator**:

1. Click **Start**
2. Type **cmd**
3. Right-click **Command Prompt**
4. Select **Run as administrator**

Run:

```plaintext
ipconfig /flushdns
```

You should see:

```plaintext
Successfully flushed the DNS Resolver Cache.
```

---

## macOS

### Hosts File Location

```plaintext
/etc/hosts
```

---

### Step 1 – Open Terminal

Press:

```plaintext
Cmd + Space
```

Search for **Terminal** and open it.

---

### Step 2 – Edit the Hosts File

Run:

```plaintext
sudo nano /etc/hosts
```

Enter your administrator password when prompted.

(Note: The password will not be visible as you type.)

---

### Step 3 – Add Verax Entries

Scroll to the bottom of the file.

Paste the entries copied from:

**Verax Console → Settings → Traffic Redirect → Web Proxy**

---

### Step 4 – Save and Exit

Press:

- **Ctrl + O** → press **Enter** (save)
- **Ctrl + X** (exit)

---

### Step 5 – Flush DNS Cache

Run:

```plaintext
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
```

No output is expected.

---

## Linux

### Hosts File Location

```plaintext
/etc/hosts
```

---

### Step 1 – Open Terminal

---

### Step 2 – Edit the Hosts File

Run:

```plaintext
sudo nano /etc/hosts
```

(You may use `vim` instead of `nano` if preferred.)

Enter your root password when prompted.

---

### Step 3 – Add Verax Entries

Scroll to the bottom of the file and paste the entries copied from:

**Verax Console → Settings → Traffic Redirect → Web Proxy**

---

### Step 4 – Save and Exit

For nano:

- **Ctrl + O** → Enter
- **Ctrl + X**

---

### Step 5 – Flush DNS Cache (If Required)

Depending on distribution:

For systemd-based systems:

```plaintext
sudo systemd-resolve --flush-caches
```

Or restart networking:

```plaintext
sudo systemctl restart NetworkManager
```

---

## Verification

After completing the steps:

1. Open a browser.
2. Access one of the redirected domains.
3. Verify traffic is being routed through Verax (as shown in your Interactions dashboard).

---

## Important Notes

- Always copy the entries directly from your Verax console.
- Incorrect entries may break access to AI tools.
- For enterprise environments, consider managing hosts entries via:
  - Group Policy (Windows)
  - Intune / JAMF (macOS)
  - Configuration management tools (Linux)
