[ start | index | login ]
start > knowledgebase > linux > misc > hosts file

hosts file

Created by kron. Last edited by kron, 2 years and 339 days ago. Viewed 2,223 times. #5
[diff] [history] [edit] [rdf]
labels
attachments

/etc/hosts

By setting up host entries in /etc/hosts, you can bypass current DNS records for that host.

This is especially helpful for testing your site before DNS changes are made (or have been seen by your local PC).

On Linux/Unix systems, this file is /etc/hosts. On Windows XP it is located in c:\windows\system32\drivers\etc\hosts.

Example /etc/hosts file:

127.0.0.1 localhost.localdomain localhost
10.0.0.2 localpc
10.0.3.5 mydomain.com

In this example, browsing to >>http://mydomain.com would take you to 10.0.3.5 regardless of any existing DNS records for 'mydomain.com'.

no comments | post comment
Powered by snipsnap.org Found a mistake in a howto? Let us know via an email to p.blikibugs at rimuhosting com.