no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | hosts_file [2015/08/06 20:47] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Hosts File ====== | ||
+ | * [[DNS]] | ||
+ | |||
+ | When looking up a domain name, the DNS request returns an IP address that the site is located at. | ||
+ | |||
+ | You can override which IP address a domain is mapped to by editing your '' | ||
+ | |||
+ | To do this on OS X, open a Terminal session and run this command: | ||
+ | |||
+ | < | ||
+ | sudo nano /etc/hosts | ||
+ | </ | ||
+ | |||
+ | Navigate to the bottom of the file with your keyboard, and add a new entry, in this syntax: | ||
+ | |||
+ | < | ||
+ | 1.2.3.4 domain.com | ||
+ | </ | ||
+ | |||
+ | Save your hosts file by pressing '' | ||
+ | |||
+ | You can exit the editor by pressing '' | ||
+ | |||
+ | **In some cases,** your web browser caches DNS lookups for domains, so you will need to **completely quit out of your browser** and restart it for the changes to appear. |