無副檔名系統文字檔,記錄 域名 → IP 位址 的靜態對應表。系統解析域名時優先查詢 Hosts,命中即直接連線,否則再查詢 DNS 伺服器。
| 作業系統 | 路徑 |
|---|---|
| Windows 9x/Me | C:\Windows\hosts |
| Windows NT/2000/XP/7/8/10/11 | C:\Windows\System32\drivers\etc\hosts |
| Linux / macOS / Unix | /etc/hosts |
| Android (Root) | /system/etc/hosts |
| iOS (越獄) | /etc/hosts |
Windows 下預設隱藏,需「資料夾選項 → 檢視 → 顯示隱藏檔案」或直接在總管路徑列貼上路徑。

127.0.0.1 badsite.com(封鎖)或 192.168.1.100 myserver.local(內網別名)Hosts 雖古老,仍是輕量、無依賴、即時生效的「核彈級」域名控制工具。