To edit the hosts file no a Windows computer, you would need to open the file C:WindowsSystem32driversetchosts as an Administrator.
- Go to the Start menu > Programs > Accessories and locate Notepad.
- Right click on Notepad and click on Run as Administrator
- Press Ctrl + O and enter "C:WindowsSystem32driversetc", and this should take you to an empty folder
- Type in the word hosts and click Open
- Go ahead and make the updates that you need and then Save & Exit.
- What is a Hostname? - Click to read more.
- The Hosts File and What It Can Do For You - Click to read more.
- How to Edit Hosts File on Mac - Click to read more.
- Need to Migrate a Website? Contact my web development agency and we'll be more than happy to do it for you.
- Need a New Web Host? Sign up with Groove Host—my clients have experienced significantly faster web page load times after moving over.
>>YAN HUANG: How do you change the hosts files -- edit the hosts files -- on Windows?
Basically, the file is located under your system root:
system 32driversetc, and the filename is hosts.
But don’t try to navigate there, because it’s a hidden file, so
you won’t find anything if you actually try to go there by clicking.
What you have to do is...you have to open Notepad.
You can’t just open it normally.
You have to go to your Start menu, navigate to Notepad, right-click on Notepad, and
click on “Run as administrator.”
If you don’t do this, you won’t be able to edit the file.
So, after you click on “Run as administrator,” it’s going to prompt you ---
it’s going to ask you...are you sure.
Go ahead and click Yes.
Now go ahead and go to your file,
and navigate to your system root.
I’ll provide the actual path for you in the link below this video, so
go ahead and click on that link.
Then you can just copy and paste the exact path.
But it’s basically under your system root:
Then, once you’re in the etc folder,
you actually have to type in the word, “hosts”.
Then, it won’t show anything in the actual box because it’s a hidden file,
unless you’ve enabled hidden files, which -- it doesn’t come by default on Windows.
So after you’ve typed that in, go ahead and press Open,
and then you’ll see the hosts file.
What you will want to do is...you will want to add the IP address, and also the hostname,
which is also, for the most part, in the context of the Internet,
will be the domain name.
If the IP address is...whatever [laughs], and then
the domain name is whatever.com,
then you would type that --
Also, make sure you enter a new line, whatever IP address,
That way...because a lot of websites, they have links that will send you to www version,
and other links that will send you to normal version.
You want to make sure you cover both of them.
That’s basically in a nutshell how you would change the IP or
edit the hosts files on a Windows.
To make sure that’s working, you can just go on your new Web host,
if you’re doing a website migration --
go to the new Web host and upload, like, a file, like a test.html file.
You know, just put in “test” in it.
Go to your browser, type in whatever.com/test.html.
If it shows up, that means you did it properly.
If it doesn’t show up, that means it’s probably still pointing to your old Web host.
Hopefully, you found this helpful. If you did, please leave a comment here and like this video.
Go to my blog, yanshenghuang.com, Like me on Facebook, follow me on Twitter,
1+ my Google+, and subscribe to my mailing list.
Make sure you subscribe to my mailing list!