SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Editing the hosts file

    If you were changing your hosting environment from shared servers to dedicated servers, and your hosts asked you to edit the hosts file on your pc, is that normal?

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,837
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Dez View Post
    If you were changing your hosting environment from shared servers to dedicated servers, and your hosts asked you to edit the hosts file on your pc, is that normal?
    Temporarily changing the hosts file on your computer provides you with a way to access both the old server and the new server while performing the move. You can remove the entries again after the move is complete.

    For example if your site is being moved from 200.12.15.25 to 200.12.15.60 you could enter the following two lines in the hosts file.

    www.example.com 200.12.15.25
    example.com 200.12.15.60

    then when you enter the address with the www you access the old server and without the www you access the new server - while everyone else accesses whichever of the two servers the nameserver they access points to.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks Stephen, understood now.

  4. #4
    SitePoint Member
    Join Date
    Jun 2013
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is helpful in the Migration of the Websites where you can access the Old Website via the Hosts file provided you have changed the NS of the Domain Name to the New Server.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •