hosts 檔案是本機域名解析對照表,常用於封鎖廣告、測試開發環境、加速特定網站存取。Windows 所有版本(含 Win10)路徑一致,本文提供標準路徑與最快開啟編輯方法。
C:\Windows\System32\drivers\etc\hosts
注意:若系統安裝在非 C 槽,請將 C: 替換為實際系統盤代號。
C:\Windows\System32\drivers\etc → 確定。
hosts 檔案 → 選擇「記事本」開啟編輯。
IP地址 域名,如 127.0.0.1 www.example.com。# 開頭為註解行。