Setting up hosts file

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)

  • If your site is located on the PHP 5.4 server, enter the IP address: 85.248.226.5
  • If your site is located on the PHP 7.0 serveri, enter the IP address: 85.248.226.7
  • If your site is located on the virtual server, enter the appropriate IP address.

Save the file.

WARNING: Rows starting with # are automatically ignored. The line in which you write a DNS record cannot start with #

Example:

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: 85.248.226.5 www.platon.sk
Eventually: 85.248.226.5 platon.sk 85.248.226.5 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.

helpdesk

we are ready to serve

currently online

agents online 2 / 6

Platon Technologies

How can we help you?

We accept reports of problems or other inducements related to the use of our products and services.

helpdesk@platon.net +421 222 111 321

In case you need any help, contact us by e-mail or by phone.

  • Even on weekends and holidays
  • Quick and expert help
  • Simple human approach
  • Complex problems solving
contact form

Give a chance to our online help-center. You can find there more than:

  • 6 categories
  • 57 manuals
  • 22 e-mail settings
  • 6 programming tips
go to counseling

Questions about our products or any specific request? Contact us.

Thanks for message

If necessary, we will contact you.

Send of message failed

Please contact us at helpdesk@platon.net.

NEWSLETTER

Subscribe to receive our news and current offers

Thanks for your subscribe

Subscribtion has failed