Top.Mail.Ru

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

Openthis folder, file hosts, using the fileeditor.

!!! To editthe hosts fileyou haveas an administrator. When you try to edit itin the usual way, when you saveyou will seean error messageaboutfailureis right.

In this fileat the very endadd the line:

1.1.1.1 domain_name

1.1.1.1 - the IPaddressof the server whereyour site is.
domainnameisthe url of Your websitein the formdomain.comoperation whichyou want to check.

Example:

1.1.1.1 example.com
1.1.1.1 www.example.com