HOW FAR WILL YOU GO

Analytics &
Expertise

Client Area

Secure Login

Technical Analysis

Hosts File: What is its purpose?

Picture of Etienne F. Carrier

Etienne F. Carrier

President and Co-founder
Private Cloud and Sovereign Infrastructure Provider

the hostfile

Hosts File: What is its purpose?

The “Hosts” file’s function is to tell your computer how to reach an IP address or a website’s domain name.

By default, it will instruct your browser to display the content of the requested website in the web navigation bar.

What is the purpose of modifying this file?

The “Hosts” file allows you to add an exception that ignores the default route by forcing your browser to go to another IP address.

This function is useful when you are developing a new site from an online domain name or when the site under development is hosted on another server and its IP address differs from the production site. By adding an exception, you will force your computer to follow the specified path as shown in the following table.

To modify your “Hosts” file, here are instructions you can follow for a computer running MacOS or Windows:

YouTubeTutorial for MacOS (English only)

YouTubeTutorial for Windows (English only)

For MacOS users, here are the commands to use in the Terminal application:
to access the “Hosts” file: sudo nano /etc/hosts
to clear the DNS Cache: sudo killall -HUP mDNSResponder

If you encounter difficulties, do not hesitate to contact us via the ticketing system, and we will assist you.

Etienne F. Carrier

About the DATAenligne team

For over 15 years, our team of infrastructure and sovereign cloud experts has been helping organizations of all sizes regain control of their digital infrastructure. We deploy enterprise-grade open-source solutions, offering superior performance without the constraints of proprietary licensing costs.

Ready to explore a
sovereign cloud infrastructure?

Schedule a free infrastructure assessment to understand how a sovereign cloud can benefit your organization. We will provide detailed cost comparisons, technical recommendations, and realistic migration timelines.
This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.