Knowledgebase: Miscellaneous
Host File
Posted by Andrew DeLira, Last modified by Andrew DeLira on 08 April 2015 09:47 AM

To point to your newly setup server or account you will need to adjust your host file. (This is required to inspect your website before changing the DNS of your domain to ensure the migration is complete)

Host File:

The hosts file contains lines of text consisting of an IP address in the first text field followed by one or more host names. Each field is separated by white space – tabs are often preferred for historical reasons, but spaces are also used. Comment lines may be included; they are indicated by a hash character (#) in the first position of such lines. Entirely blank lines in the file are ignored. For example, a typical hosts file may contain the following:

The contents of the host file will look like:

---------------------------------------

127.0.0.1  localhost loopback

::1        localhost

---------------------------------------

Host File Locations:

Unix, Unix-like, POSIX - /etc/hosts

Microsoft Windows - 95, 98, ME - %WinDir%\hosts

Microsoft Windows - NT, 2000, XP,[5] 2003, Vista, 2008, 7, 2012,8 - %SystemRoot%\System32\drivers\etc\hosts

Apple Macintosh - Mac OS X 10.0 – 10.1.5 - (Added through NetInfo or niload)

Apple Macintosh - Mac OS X 10.2 and newer -   /etc/hosts (a symbolic link to /private/etc/hosts)

What to add to the Host File:

At the bottom of the Hosts File please add a the following however include your new Main IP and your Domain

xxx.xxx.xxx.xxx domain.com m.domain.com www.domain.com (Red indicates where you would fill in your own information)

Once this is complete you would save the Host File.

Next Step:

 Ping your domain and the new servers ip should show if it does you have done this step correctly. 

You will now go to your domain in a browser and this will point to your newly setup server (Please proceed to inspect your website)

 

If you have any questions please don't hesitate to contact us at support@pacifichost.com or by replying to your active ticket.

(0 vote(s))
Helpful
Not helpful

Comments (0)