When we migrating sites to a new web hosting provider we usually want to see how the site behaves on a new web host to avoid possible mistakes and unavailability.
This can be done without changing the DNS on the original page by setting a hard DNS record on your computer.
This DNS record must be written to the hosts file that you can find in Windows on the system disk in Windows/System32/drivers/etc/ (in Linux is located in the / etc / directory)
However, to be able to edit the file, you need to open it as a system administrator
To do this, follow these steps:
In the Start menu open All programs and Accessories. Right click on Notepad. From the menu, select Run as administrator.
In the Notepad's horizontal menu, click File -> Open...
Search for the folder Windows/System32/Drivers/Etc/ and open the Hosts file
Write the appropriate DNS record at the end of the file in shape IP adress(space)domain name (there must be a space between the IP address and the domain name)
Save the file.
WARNING: Rows starting with # are automatically ignored. The line in which you write a DNS record cannot start with #
We want to display the domain content www.platon.sk, which was migrated to Platon Webhosting. So we write the following record to the hosts file: 220.127.116.11 www.platon.sk
Eventually: 18.104.22.168 platon.sk 22.214.171.124 subdomain.platon.sk
Once you enter the address into your browser, you will see a version of your page that is located on the new web hosting server. This entry only applies to the computer on which it is set, so other visitors of your website will still see the original version.
After migrating and changing the DNS of the domain to new webhosting servers, please remember to delete the records listed in the hosts file. This avoids misunderstandings that might occur in the future.
If your site is on a virtual server, enter the appropriate IP address.
In case you need any help, contact us by e-mail or by phone.
Give a chance to our online help-center. You can find there more than:
Questions about our products or any specific request? Contact us.
If necessary, we will contact you.
Please contact us at firstname.lastname@example.org.