BE SOCIAL & SHARE:

When transferring to a new hosting provider, the most important thing for you to do is to test your website before pointing your domain over. This will help guarantee a successful migration by ensuring your site is 100% functional before making the switch.

What you will need:

  • Your GreenGeeks service server IP. You can find this in your service welcome email, or by contacting support to confirm the correct IP address you’ll need to use.

Redirecting via System HOSTS File

The best way to test your website is by staging your domain via your system’s HOSTS file. This method avoids having to wait for DNS propagation, however will only work for the local system. If someone else would like to test the site, they will need to follow the same steps for modifying the HOSTS file.

  1. Open your text editor of choice. Windows users will need to use Notepad with administrative privileges in order to be able to modify the HOSTS file (right click Notepad -> Run as Administrator).
  2. Open your systems HOSTS file. The location of this file is as follows:
    Windows: C:\Windows\System32\drivers\etc\hosts
    Linux / Mac:  /etc/hosts
  3. Take note of your GreenGeeks server IP, and add the following line to the file on a new line at the bottom of the HOSTS file:
    SERVER_IP_HERE yourdomain.com www.yourdomain.com
  4. Note that SERVER_IP_HERE needs to be replaced with your actual server IP. The yourdomain.com references should be replaced with your actual domain name. The following line is an example:
    13.57.24.68 myawesomesite.com www.myawesomesite.com
  5. Save the file, restart your web browser, then navigate to your website. The site will now load from the GreenGeeks server!
  6. To revert this change, simply remove the line you added and save the file. This will direct the site back to the original host.

About The Author

Comments

  1. James Walters

    Thanks for this. There’s one thing you might want add at the end: “You may need to delete the extra line from /etc/hosts and restart your browser before you go to your domain registrar to change the nameservers.”

  2. Rory

    This doesn’t work on mac OS X because the host file is locked by the operating system and cannot be edited by any user not even an admin.

  3. Kaumil Patel

    Hi James,

    Thanks for the suggestion. We already had “To revert this change, simply remove the line you added and save the file. This will direct the site back to the original host.” at the end of the article, but we’ve made it a bit more clear by adding it as its own bullet point.

Leave a Reply

Your email address will not be published. Required fields are marked *