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.# # This is an example of a HOSTS file used by Microsoft TCP/IP # for Windows. # # This file contains the mappings of IP addresses to host names. # Each entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. The # IP address and the host name should be separated by at least one space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name. They are indicated by the # symbol '#'. # # For example : # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host 127.0.0.1 localhost
4.39.504.987 monsite.com www.monsite.com
Je suis désolé que vous ne soyez pas en mesure de modifier votre fichier hosts correctement. Si vous souhaitez tenter une alternative, je vous invite à essayer ce site internet qui devrait répondre à vos besoins.
Suivez ces quelques étapes une fois sur le site internet :
Dans Preview, laisser par défaut (the regular website)
Ajouter l'adresse IP de votre serveur web dans le champ de hosted on, IP que vous pouvez retrouver directement en suivant notre documentation
Dans le champ under saisissez votre nom de domaine
Laisser par défaut le champ over
Valider avec Go
Je vous remercie pour votre attention et reste à votre disposition pour toute autre question ou complément d'information.
Cordialement, L'équipe LWS
Was this answer helpful?
A question about this article?
Ask the LWS team and the community. Answers are published after moderation.
Ask the LWS team and its community a question
!
To enable this form, please tick the two consent boxes below.