Editing your Hosts File – HostGator Migration Tutorial

Editing your Hosts File is an incredibly useful tool when it comes to building and editing websites. When you are building a new version of a website on a new or testing server, you want to be able to see and make changes without affecting your current website. Additionall if you ever want to move from one server to another, you need to be able to ensure that your website made the transfer safely, and you are good to make the switch.

What editing your Hosts File does is it basically tricks your computer into believing that the domain name you are working on is actually pointed towards a different account than what your DNS is saying.

This makes it so that you can see/ work on your new website, while the rest of the world sees the old version, that way you can tweak and tinker away without experiencing any downtime.

In this video, you will learn:
00:00 – Introduction
00:48 – Why you might edit your Hosts File
01:23 – How to tell where your Domain Name is pointed
01:59 – The tools you need to Edit your Hosts File
03:05 – Locating your Hosts File
03:48 – Reading and Editing your Hosts File
05:25 – Removing the Hosts File Change
05:49 – Flushing your DNS
06:25 – Conclusion

The Tools you will Need:
Notepad tool
Administrator access to your computer
Your hosting account information (old and new)

How Do I change My Hosts File? Knowledgebase Article:

Why Edit a Hosts File?
There are a few reasons. Moving your website from one server to another, and building a new website for a domain name that already has a site on it are the two big ones.

How to tell where a domain name is pointed?
We recommend using the tool leafdns.com. When using leafdns, you can scroll all the way to the bottom to locate something called your A record. This record points towards an IP address, which should line up with your Site IP address, which you can locate in your cPanel. For more information on DNS, check out this article.

Locating your Hosts File:
Make sure you are capable of opening the file as Administrator, or these changes will not work.
The filepath to the Hosts File is:

Follow us on our Social Media:
Twitter: https://twitter.com/HostGator
Facebook: https://facebook.com/HostGator
Instagram: https://instagram.com/hostgator
YouTube: https://youtube.com/user/hostgator

Join the Website Owners Community on Facebook: http://gtr.bz/vYJZ30qIcfg

You May Also Like