Posted on September 9, 2017

How do you Preview a Website before Changing DNS?

One of the most common questions we receive from our clients is knowing how they can preview a website that has been loaded on our servers before the DNS records have been changed over to point to us.

The preferred method we suggest, is editing the Hosts file on the Operating System. Every operating system, whether it is Windows, Linux, or Mac, have a txt file called the hosts file. This file contain an IP-domain mapping, with each entry on its own line. Your computer will check this file before retrieving the information from the DNS server. So to put simply, what is mapped is the Hosts file overrides the records in the DNS server.

So by changing the hosts file to the associated IP, you can now see the website on your computer.

Let’s quickly review how to change the hosts file on each Operating System:

For this tutorial, we will using the following domain and the IP. The IP will be an IP that will be associated with the domain on our (FullHost’s) network.


Before making any changes, ALWAYS make a backup copy of the hosts file.

Windows OS (10 and 8)

  • Find the notepad application on your windows machine, open it by right clicking and Run as administrator.
  • Open the file: c:\Windows\System32\Drivers\etc\hosts
  • Scroll down to the very bottom of the file and add these lines:
  • Save the file
  • Clear your browser cache and restart the browser
  • Now open the website as you would normally


  • Open the Terminal.
  • Open the hosts file using any text editor like nano or vim or gedit.
    • nano /etc/hosts
  • Scroll down to the very bottom of the file and add these lines:
  • Save the file
  • Clear your browser cache and restart the browser
  • Now open the website as you would normally

Mac OS X 10.6

  • Open Applications > Utilities > Terminal
  • Open the hosts file
    • sudo nano /private/etc/hosts
  • Add these lines:
  • Save the hosts file
  • Apply the changes by flushing the DNS cache by using the command below.
    • dscacheutil -flushcache

Now that you’ve made the changes to the hosts file, you can check whether you have edited the hosts file correctly.

  • Open the command line console, cmd in windows, Terminal in Linux and Mac.
  • Ping your website, ping
  • If it returns the IP configured in the hosts file, then you’re done!

Leave a Reply

Your email address will not be published. Required fields are marked *

Trusted by Clients Across All Industries

Don’t take our word for it - let our happy clients do the talking. See More

Full Host did an amazing job of migrating my site seamlessly onto their server. My only regret was not switching my site over to them sooner. Now it is performing great, images are uploading way faster than ever before.

" Vancouver Sofa and Patio - Jerry Schmidt

Two thumbs up for Fullhost! Agents reply to me fairly quickly or at least let me know they received the ticket and are looking into it. Kudos to the support team as they have always given me exactly what I need without delays.

" Universal Staffing Inc. - Anthony Calvano

FullHost is an absolute pleasure to work with, and their customer service is exceptional. Whenever I have questions or need adjustments, they are there to help, quickly, efficiently, with answers and insights.

" Mooseworld Inc. Norine Leibel

The Fullhost team was a huge help in getting the website moved over and set up in a way in which we could correct the technical issues. They were quick, helpful and technically knowledgeable.

" Canadian Sport Institute Pacific Noah Wheelock

Our organization Has been working with FullHost for a couple of years now, and we have been thrilled with the service.

" Canadian Centre for International Justice / Philippe Kirsch Institute Pearl Eliadis

Exceptional is the word when it comes to FullHost. I started my own business and in the jungle of applications, licenses and registrations, FullHost had my back.

" Statsmen Matthias Bass

The customer service and support staff that I have dealt with have all been great. The move from my previous host was smooth thanks to the support staff at Full Host who moved my files over.

" Moose Web Design - Michelle Nortje

With coast to coast coverage,
We help you serve the world.

Whether your audience is located in Europe, Asia, Africa, or Australia, provide them with lightening speed!

FullHost's data centers are located in Toronto and Vancouver to ensure worldwide quality and speed.

Get in Touch
We Trust Only The Best Tech to Support You

FullHost operates with the most innovative technology to bring you unparalleled levels of hosting services.