Frequently Asked Question

Add a hosts entry for local resolution
Last Updated about an hour ago

Answer

To add a hosts entry that resolves local.example.gen to 192.168.128.10 on Windows 10, Windows 11 or Windows Server 2025, follow these steps:

  1. Open Notepad as Administrator
  • Search for Notepad in the Start menu.
  • Right‑click and choose Run as administrator. This is required because the hosts file is protected by system permissions.
  1. Open the hosts file
  • In Notepad, click File → Open.
  • Navigate to C:\Windows\System32\drivers\etc\.
  • Change the file‑type dropdown from Text Documents (.txt) to All Files (.*) so you can see hosts.
  • Select hosts and click Open.
  1. Add the entry
     192.168.128.10    local.example.gen
  • Scroll to the bottom of the file (or to an empty line) and add the following line exactly as shown:
  • Ensure there is at least one space (or tab) between the IP address and the hostname.
  1. Save the file
  • Click File → Save (or press Ctrl + S).
  • If you receive a permission error, confirm the UAC prompt and save again.
  1. Flush the DNS cache (to apply the change immediately)
     ipconfig /flushdns
  • Open Command Prompt as administrator (right‑click Start → Windows Terminal (Admin) or Command Prompt (Admin)).
  • Run:
  1. Verify the resolution
     ping local.example.gen
  • Open a new Command Prompt (no admin rights needed).
  • Ping the hostname:
  • You should see replies from 192.168.128.10.
  • Alternatively, use nslookup local.example.gen to confirm the IP returned.
  1. Troubleshooting tips
  • No effect after editing – double‑check that Notepad was run as administrator and that the file was saved correctly.
  • Incorrect IP returned – ensure there are no stray characters, extra spaces, or duplicate entries for the same hostname.
  • Ping fails – verify that the target device (192.168.128.10) is reachable on the network and that no firewall is blocking ICMP.

What to check next

  • Confirm that the hostname local.example.gen is not already defined elsewhere (e.g., in DNS or another hosts entry).
  • Ensure the IP address 192.168.128.10 is assigned to the correct network interface on the target machine.

Following these steps will add a permanent local DNS entry for local.example.gen on any Windows 10/11/Server 2025 system.

This FAQ was generated and/or edited by GAIN, GENs Artificial Intelligence Network and should not be considered 100% accurate. Always check facts and do your research, things change all the time. If you are unsure about any information provided, please raise a support ticket for clarification.
This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...