# SwitchHosts Mac 版：管理并切换 hosts 文件条目

_As of 2026-11-28_

- **Version:** 5.0.3
- **License:** Free

SwitchHosts 是一款免费的开源应用，用来管理 hosts 文件。你可以保存多组条目，既可以是本地的，也可以从 URL 加载，然后在窗口或菜单栏里点一下就能启用或停用。

The hosts file maps domain names to IP addresses before any DNS server is asked, so it is the quick way to point a domain at a test server. SwitchHosts keeps each environment as a named set of entries and writes the file for you.
What it does well

Sets you can combine. Keep entries for development, staging and other environments in groups and folders, and switch on one or several at once.
Remote hosts. Load entries from a URL and refresh them on a schedule, so a team can share one list.
Editor. Syntax highlighting for addresses, domains and comments, find and replace, and a shortcut to comment a line out.
Menu bar switch. Turn sets on and off from the menu bar icon without opening the main window.

Who it is for
Web developers and testers who point the same domains at different servers, and administrators who maintain a shared list of entries.
Good to know
A hosts file only maps whole host names to addresses: no wildcards, no ports, no paths. To rewrite single requests or redirect by URL, use a debugging proxy such as Proxyman or Charles. macOS may ask for authorisation when the file is written.
How to install

On the download page, choose the build for your chip, or the universal one.
Open the disk image and drag SwitchHosts to Applications.
The first time you open it, macOS asks you to confirm an app downloaded from the internet; click Open.

> Source: https://macsoftpark.net/zh/switchhosts/
