There was a problem loading the comments.

Edit Hosts File Windows Guide

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

How to Edit Your Hosts File on Windows?

 

Most Windows users follow absolutely the same steps, only your visual environment may differ.

 

Step 1 – Find Notepad and Run as Administrator

 

Click the Windows key and type Notepad in the search bar. Before you open it, right-click the mouse over it and choose the Run as Administrator option.

a8a2781d88cfb4126fb8208317b7c0d3885f1837341788d6b9f438809e3599aa57235297335d5ff4?t=8ad4853dbca330e7b94500c63f266244

IMPORTANT: Don’t forget to open the notepad as an administrator or you won’t have enough rights to save the changes to the Hosts file.

 

Step 2 – Locate the Hosts File

 

Inside the Notepad, open the File menu and click the Open option. This will open your main PC folder. To navigate straight to the Hosts file, you can type the following path in the address bar:

 

c:\Windows\System32\Drivers\etc\hosts

2Q==

The system may ask you about the desired app to open the file, you can choose Notepad again. Inside, your Hosts file will look a little something like this:

 

Step 3 – Edit the Hosts File

 

Here is where you will be doing alterations to point your domain to the new server just for your computer. Start from the bottom line and add your records like this:

 

IP Address yourdomain(.)com www(.)yourdomain(.)com

2Q==

IMPORTANT: Make sure to add both the www and non-www versions of your domain. Also, you need to add a line for every domain name you wish to test.

 

Step 4 – Delete Changes after Testing

 

One important step you should not forget is returning everything as it was before you made the change. Delete the lines you added and return the Hosts file to its default state.

2Q==

IMPORTANT: The changes you make to the Hosts file point the domains to your new server just for your computer. Visiting the website from another device will load it from the old server until you change the name servers.

 


Share via

Related Articles

Copyright © 2026 TheGigabit. All right reserved. Reg.No: 200701034297 (792326-P)