Procédure
What is the hosts file?
A hosts file allows you to associate a host name or domain name with an IP address. Changes made to this file take effect immediately after the modification. This file is available on all operating systems.
I. Things to know before modifying the Hosts file on your computer
The Hosts file is intended to make your computer believe that your domain name points to a specific hosting account, so this does not cause any malfunction of your domain name or your website on its current hosting. You will be the only one to see the changes. Other visitors will see your website on its current hosting.
Setting up a configuration in the hosts file may require clearing the browser cache files after each change so that everything works perfectly and you can view your site on LWS or on its current hosting.
Your domain not yet actually pointing to your LWS hosting, the SSL certificate cannot be installed and you will probably have to ignore your browser's security warnings. Do not worry, once your domain redirects to our hosting, the certificate will be functional and your domain secured in HTTPS.
II. What settings should I enter in my Hosts file.
The configuration line to add to a Hosts file is as follows:
XXX.XXX.XXX.XXX domain.tld www.domain.tld
XXX.XXX.XXX.XXX is the IP address of the web server for your package at LWS, so you will need to replace this with the actual IP address of the LWS server.
domain.tld is a generic placeholder for your domain name; you will need to replace it with your real domain name.
This entry in the Hosts file is used to tell your browser that the domain you entered (with or without www) points to the IP you indicated and not the usual IP.
To find out the IP to enter, we invite you to follow this documentation. Only the WEB service IP is required.
III. How do I modify a hosts file on Windows?
A. Manual procedure
The hosts file is located at the following path:
C:\WINDOWS\system32\drivers\etc\hosts
11. The first thing to do is open a text editor such as Notepad or Word, in administrator mode (right-click then run as administrator).
22. Once the text editor is open, go to File -> Open and browse to the hosts file (C:\WINDOWS\system32\drivers\etc\hosts).
33. Then insert the hosts line you want to add: for example: 4.39.504.987 monsite.com www.monsite.com
Once this is done, your file should look like this:
Copyright (c) 1993-1999 Microsoft Corp.
127.0.0.1 localhost
4.39.504.987 monsite.com www.monsite.com
44. Then save the modification.
This modification takes effect immediately.
B. Using Microsoft's PowerToys utility
11. Go to the download page for Microsoft's PowerToys utility available on their Store.
22. Then click on "Install"

33. Click the "Install" button again in the window that will then appear

44. Once the application is installed, open it and select "Hosts File Editor" in the left menu.

55. Then click on the "Launch Hosts File Editor" button

66. A warning message will appear. You must accept this message to continue.

77. Then click on "+ New entry" ...

... and enter the desired settings before clicking on "Add".

You will then only need to leave the option enabled to view your site on LWS, or disable it to view it on the current hosting provider.

IV. How do I modify a hosts file on Mac?
11. Open Terminal
Open the MAC search tool « Spotlight » using the command:
CMD + SPACE

22. Open the Mac Hosts file via the terminal
Once your terminal is open, type the following command line:
sudo pico /etc/hosts
then press ENTER
Enter your Mac session password.
/!\ It will not appear in the terminal, type your password in full and press ENTER
33. Modify your Hosts file
Make the necessary changes inside your hosts file using the arrow keys on your keyboard.
44. Save your changes
To save your changes and exit the application, follow the commands below:
CTRL+O (^O) to save your changes then click on « ENTER ».
CTRL+X (^X) to exit the hosts file. You can close the « terminal » application.
All you need to do now is exit your terminal. The hosts file has been modified on your Mac.
Conclusion
You are now able to modify a Hosts file on Windows or on Mac with LWS. You can modify and/or delete the Hosts file at any time.
Feel free to share your comments and questions!