Skip to content

Check Web Functionality Prior To DNS Change

Every now and then you may find yourself in situation where you need to try you web site in the browser while it's DNS is not configured yet or it  points to different location than is the web server that holds the data you need to try.

For historical reasons most of operating systems have file called hoststhat works as a local address-to-name database. This file has usually the highest priority in the address-translation hiearchy so system checks it before any DNS query is done towards the name servers. In UNIX-like systems you can check and change this priority in /etc/nsswitch.conf. Problem mentioned in the top could be solved by adding one line into this file.

Unix-like OSs

In UNIX-based operating systems (Linux, BSD, MacOS X, Android) is this file usually located in /etc/hosts and you need root permissions to change it. 


In modern versions of Microsoft Windows is this file located in C:\Windows\System32\drivers\etc\hostsand can be edited by Administrator user only. Simpliest way how to edit it is to run notepad using the option 'Run as Administrator' from menu given by clicking on it with right mouse button. Then you can open the file and save it. In MS Windows this file could be protected from editing by some antivirus software. You need to know exact IP address that new web site runs on. This address is usually the same as the FTP IP address. To clarify please contact our technical support.

Record syntax

New records are added in the following format:

Be aware that such a record is valid for this domain only and not for it's subdomains like To cover such a domain you need to include it in the list of names.

It is not possible to use a wildcards, such as  *, in this file. All domains must be named explicitly.