How to test a site without changing the DNS?

If you want to test a website before changing the DNS, or you just changed DNS, and while waiting for their updates, but now you need to start working on a website, then we can suggest you a solution in this situation:

Change host

for Windows 95/98/ME: /Windows/hosts
for Windows NT/2000: /Winnt/system32/drivers/etc/hosts
for Windows XP/2003/Vista/7/8/10: /Windows/system32/drivers/etc/hosts
for Linux, Unix, BSD: /etc/hosts
for Mac OS X and iPhone OS: /private/etc/hosts или /etc/hosts

Open this folder, file hosts, using the file editor.

!!! To edit the hosts file you have as an administrator. When you try to edit it in the usual way, when you save you will see an error message about failure is right.

In this file at the very end add the line:

1.1.1.1 domain_name

1.1.1.1 - the IP address of the server where your site is.
domainname is the url of Your website in the form domain.com operation which you want to check.

Example:

1.1.1.1 example.com
1.1.1.1 www.example.com