# SwitchHosts

Manage and switch local, remote and grouped hosts-file configurations with syntax highlighting, scheduled refresh, import/export and a system tray interface.

> This is the Markdown version of the SwitchHosts page on OpenNavo, with the same facts as the web page: <https://opennavo.com/apps/switchhosts>

- **Latest version**: `5.0.3`
- **Developer**: oldj / SwitchHosts contributors
- **Homepage**: <https://switchhosts.vercel.app/>
- **Categories**: [Networking](https://opennavo.com/categories/network)
- **Install**: `brew install --cask switchhosts`
- **30-day installs**: 296
- **Homebrew**: Available; updated by Homebrew
- **Download URL**: <https://github.com/oldj/SwitchHosts/releases/download/v5.0.3/SwitchHosts-5.0.3-mac-aarch64.dmg>
- **SHA-256**: `dcc3feabcea1906941532150f13fd6d8a30e52d21d7dcccd6df65704ffc0792c`

SHA-256 only checks that the download is complete; it is not a security certification.

## Installation and removal contents

```json
[
  {
    "declaration": {
      "app": [
        "SwitchHosts.app"
      ],
      "target": "/Applications/SwitchHosts.app"
    },
    "phase": "install",
    "sources": [
      "SwitchHosts.app"
    ],
    "target": "/Applications/SwitchHosts.app",
    "type": "app"
  },
  {
    "declaration": {
      "zap": [
        {
          "trash": [
            "~/.SwitchHosts",
            "~/Library/Application Support/SwitchHosts",
            "~/Library/Caches/net.oldj.switchhosts",
            "~/Library/Logs/net.oldj.switchhosts",
            "~/Library/Preferences/SwitchHosts.plist",
            "~/Library/Saved Application State/SwitchHosts.savedState",
            "~/Library/WebKit/net.oldj.switchhosts"
          ]
        }
      ]
    },
    "phase": "cleanup",
    "sources": [],
    "type": "zap"
  }
]
```

## About

SwitchHosts is a free, open-source hosts-file manager maintained in oldj/SwitchHosts. The official project uses Tauri, React, Jotai and Mantine and is distributed under the Apache license. It helps maintain separate hostname mappings instead of repeatedly editing the system hosts file by hand.

### Manage and apply configurations
Organize system, local, remote, group and folder entries. Switch configurations from the main window or system tray, edit with syntax highlighting, and find or replace text across entries. Remote hosts can refresh manually, on a schedule or at startup. Import and export hosts data, including backups from a URL, and use the trashcan to restore or permanently delete removed entries.

### Preferences and backups
Preferences cover write mode, proxy settings, update checks, launch at login, post-apply commands and the local HTTP API. The v5 layout stores the hosts tree, entry content, trashcan, configuration and history separately under ~/.SwitchHosts. Copy that whole directory for a complete manual backup; the in-app JSON export includes hosts data but not preferences or history.

### macOS installation and version scope
Homebrew installs SwitchHosts.app from the official 5.0.3 Apple-silicon DMG, with separate Intel artifacts. Version 5.0 migrated the backend from Electron to Tauri; 5.0.1 added a macOS privileged Helper to reduce repeated administrator prompts for /etc/hosts writes. The latest three recorded versions are 5.0.3, 5.0.2 and 5.0.1.

### Sources
- https://github.com/oldj/SwitchHosts
- https://raw.githubusercontent.com/oldj/SwitchHosts/master/README.md
- https://github.com/oldj/SwitchHosts/releases/tag/v5.0.2
- https://github.com/oldj/SwitchHosts/releases/tag/v5.0.1
- https://github.com/oldj/SwitchHosts/releases/tag/v5.0.0
- https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/s/switchhosts.rb

## System requirements

- Build for macOS 27, 26, 15, 14, 13, 12, 11 · Version: 5.0.3 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/switchhosts.rb> · Checked 2026-11-27
  - <https://github.com/oldj/SwitchHosts/releases/download/v5.0.3/SwitchHosts-5.0.3-mac-x64.dmg>
  - SHA-256: `8ca7c6b309cee80a30b076c713e8da25e0daf23c01b7bc57405807331e94bf31`
- Build for macOS 27, 26, 15, 14, 13, 12, 11 · Version: 5.0.3 · Apple silicon · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/switchhosts.rb> · Checked 2026-11-27
  - <https://github.com/oldj/SwitchHosts/releases/download/v5.0.3/SwitchHosts-5.0.3-mac-aarch64.dmg>
  - SHA-256: `dcc3feabcea1906941532150f13fd6d8a30e52d21d7dcccd6df65704ffc0792c`

## SwitchHosts security facts

Only facts that can be checked, each with its source and date. This is not a safety certification. To check the files you downloaded, scan them on your Mac with OpenNavo.

- <https://github.com/oldj/SwitchHosts> · Open source: Yes — <https://github.com/oldj/SwitchHosts> · Checked 2026-11-13

## Uninstall

- `brew uninstall --cask switchhosts`

A regular uninstall removes the app and keeps its settings and caches.

### Deep clean (optional)

- `brew uninstall --zap --cask switchhosts`

`--zap` also deletes the settings, caches and other files listed in the Homebrew definition. They can include data shared with other apps and cannot be restored, and it does not guarantee that nothing is left. Back up any data you need first. To keep settings and caches, leave out `--zap`.

A regular uninstall removes the app and keeps its settings and caches.

- Files and folders: `~/.SwitchHosts` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/switchhosts.rb> · These entries come from the Homebrew definition, checked 2026-11-27. They say what it declares, not what is on your Mac.
- Files and folders: `~/Library/Application Support/SwitchHosts` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/switchhosts.rb> · These entries come from the Homebrew definition, checked 2026-11-27. They say what it declares, not what is on your Mac.
- Files and folders: `~/Library/Caches/net.oldj.switchhosts` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/switchhosts.rb> · These entries come from the Homebrew definition, checked 2026-11-27. They say what it declares, not what is on your Mac.
- Files and folders: `~/Library/Logs/net.oldj.switchhosts` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/switchhosts.rb> · These entries come from the Homebrew definition, checked 2026-11-27. They say what it declares, not what is on your Mac.
- Files and folders: `~/Library/Preferences/SwitchHosts.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/switchhosts.rb> · These entries come from the Homebrew definition, checked 2026-11-27. They say what it declares, not what is on your Mac.
- Files and folders: `~/Library/Saved Application State/SwitchHosts.savedState` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/switchhosts.rb> · These entries come from the Homebrew definition, checked 2026-11-27. They say what it declares, not what is on your Mac.
- Files and folders: `~/Library/WebKit/net.oldj.switchhosts` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/switchhosts.rb> · These entries come from the Homebrew definition, checked 2026-11-27. They say what it declares, not what is on your Mac.

## Latest release notes

### 5.0.3 (2026-10-20)

Adds batch DoH resolution, import previews and history controls, with macOS tray and hosts-switching fixes.

- Resolves domains into hosts entries with batch DNS-over-HTTPS lookups and cached-IP fallback.
- Previews file/URL imports with selective append or confirmed replacement, preserving folders and references.
- Adds history retention controls and live HTTP API port changes.
- Opens comment links with Cmd+Click on macOS.
- Fixes toggle/content synchronization, import validation and stale domain-refresh results.
- Fixes tray popups over full-screen apps and clicks on macOS 27.

[Official release](https://github.com/oldj/SwitchHosts/releases/tag/v5.0.3)

## Facts and sources

- <https://opennavo.com/apps/switchhosts>
- <https://opennavo.com/apps/switchhosts/versions>
- <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/switchhosts.rb> · Checked 2026-11-27
- <https://formulae.brew.sh/cask/switchhosts>
- <https://github.com/oldj/SwitchHosts> · Checked 2026-11-13
