Emulate a DNS change via the / etc / hosts file

Modified on Tue, 4 Dec, 2018 at 12:24 PM

On this page: we detail how to make a DNS change on your computer without actually making the change. This can be useful during the test phase to test your site before connection. 

The main idea is to edit the hosts file on your computer to point your domain name to an IP on the Fasterize platform. You will add a new line in the hosts file following the format "ip-address domain.com". 
If your site is www.example.com , the added line will be for the Europe platform: 

212.83.173.208 www.example.com 

Note: If your site's main domain is behind a CDN, contact Fasterize support. 

The steps to edit the hosts file vary depending on whether you are on a PC or Mac, but also depending on the version of your operating system. We have compiled a set of external resources for each operating system. 

WINDOWS Article:


Beginner Geek: How To Edit Your Hosts File

WINDOWS Video:



 

MAC Article:


How to edit the hosts file in Mac OS X – Leopard

MAC Video:



MAC Tool:

On Mac, there is a tool called Gas Mask. It allows to easily edit its hosts file. You can download it here . 



Empty the DNS cache

Depending on your operating system, you may need to empty your DNS cache. 



Windows 8



 


Windows 7



 


Mac OSX


Restart the browser

To change the hosts file, restart your browser. 

On Chrome, you can see through the Chrome extension if the change is taken into account and if the site is optimized. The icon is gray if the site does not go through Fasterize.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article