How to check the operation of the site locally on a PC
In cases where you need to check how the site works from a certain server, but do not need to make changes to the domain DNS settings, you can write the IP address of the server and the domain name in the hosts file on the PC
The hosts file is a system file used to manually match domain names to IP addresses.
Appointment:
- Local development and testing: allows you to redirect the domain to a local server (for example, 127.0.0.1) to test the website without making changes to the DNS.
- Temporary solution: to access the site when updating DNS or solving problems with network settings.
Settings for OS Windows are entered in a file located at the following path: C:\Windows\System32\drivers\etc\hosts Add the IP address data and domain space to the file and save the settings
To edit a file on Unix OS, you can open it with a convenient text editor or through the terminal with sudo The file is located in \etc\hosts