How can I check the content of my website before switching the DNS records?
If you are transferring the website to our hosting, or have not changed the DNS records for your domain yet, but you would like to check how your web-site will look like on our servers. It is all possible. You can find two ways of setting it below:
1) Modifying 'hosts' file
- Windows OS
- Mac OS
2) Creating a subdomain
1) Modifying ‘hosts’ file
This method allows you to check your site's look by simply typing its name in the browser. When the file is modified, this doesn't influence your domain's DNS zone and all the users on the web continue to see the site from your old server. You, however, will not need to wait for the DNS propagation and all the changes will be instantly applied.
To set the file up, please perform the following steps:
If you use: Windows OS
- It is recommended to close the browser before performing the change;
- Please open the folder C:\Windows\System32\drivers\etc;
- Double-click on the 'hosts' file and choose the Notepad from the list of available software;
- Input the following string in the end of the document:
( where IP_address is the IP address of your hosting server, and domain_name is your domain name ) Note: ask support for your IP address
- Save the file and re-open your domain name in the browser.
If you are using Mac OS:
- Open the Terminal.app, either by start typing Terminal on the Spotlight, or by going intoApplications --> Utilities --> Terminal;
- Open the hosts by typing on the Terminal that you have just opened:
sudo nano /private/etc/hosts
Type your user password when prompted;
*You can navigate the file using the arrow keys;
- Edit the hosts file appending your new mappings underneath the default ones:
( where IP_address is the IP address of your hosting server, and domain_name is your domain name )
Or edit one of the default values if you know what you are doing!
- Save the hosts file (when done editing the hosts file, press CTRL+o to save the file. PressEnter on the filename prompt, and Ctrl+x to exit the editor. );
- Flush the DNS cache ( you can issue a simple Terminal command to flush the DNS cache, and have your host file changes to take immediate effect: dscacheutil -flushcache ).
Was this answer helpful?
why is this post here?
Powered by WHMCompleteSolution