Green YGreck Guides FR
🪟 WindowsIntermediate⏱ 5 min5 steps

Edit the hosts file

Map a domain name to an IP address locally, for example to test a website.

  1. Open Notepad as administrator (right-click → Run as administrator).
  2. File → Open, then paste this path and choose "All files":
    C:\Windows\System32\drivers\etc\hosts
  3. Add one line per entry: the IP address, then the name.
    127.0.0.1   exemple.test
    192.168.1.20   nas.maison
  4. Save, then flush the DNS cache.
  5. DNS cache:
    ipconfig /flushdns
⚠️ Never paste lists found on the Internet without reading them: one bad line can redirect a site to a fake.