How to Temporarily Access a Website Using a Local DNS (Hosts File)

Windows Instructions

  1. Open Notepad as Administrator
    • Click Start
    • Search for Notepad
    • Right-click and select Run as Administrator
  2. Open the hosts file located at:
    C:\Windows\System32\drivers\etc\hosts

    If you do not see the file, change file type to "All Files".

  3. Add the following lines at the bottom:
    123.123.123.123   example.com
    123.123.123.123   www.example.com
  4. Save the file.

Linux Instructions

  1. Open Terminal.
  2. Edit the hosts file:
    sudo nano /etc/hosts
  3. Add the following lines at the bottom:
    123.123.123.123   example.com
    123.123.123.123   www.example.com
  4. Save and exit:
    • Press CTRL + X
    • Press Y
    • Press Enter

macOS Instructions

  1. Open Terminal.
  2. Edit the hosts file:
    sudo nano /etc/hosts
  3. Add the following lines at the bottom:
    123.123.123.123   example.com
    123.123.123.123   www.example.com
  4. Save and exit:
    • Press CTRL + X
    • Press Y
    • Press Enter
  • hosts file, local DNS override, temporary DNS access, access website before DNS propagation, DNS propagation testing, test website before nameserver change, preview website on new server
  • 0 gebruikers vonden dit artikel nuttig
Was dit antwoord nuttig?

Gerelateerde artikelen

Q: How do I transfer my domain to Enet Online Solutions?

ANS: Before you can transfer, ensure the following: Your domain should not be LOCKED. If the...

Q: How do I get the Domain EPP code?

  ANS: The EPP Code (Extensible Provisioning Protocol) also referred as Domain Authorization...

Q: How do I change the domains nameservers?

ANS: How do I change the domain's nameservers? Login to your client area,...

Q: How do I Lock/Unlock my domain?

  ANS: The Domain's Registrar Lock is prevents unauthorized transfer of a domain. We recommend...

Q: How do I change the domain's contact details?

  ANS: Internet Corporation for Assigned Names and Numbers (ICANN), our regulating authority...