Easily Edit Hosts File in Mac OS X from a Preference Pane
The hosts file maps hostnames to IP addresses, it’s present in virtually every OS in some form or another and in Mac OS X it’s stored at /etc/hosts, which requires administrative privileges to modify and generally a jump to the command line. Editing the hosts file allows you to do a variety of things like set local test domains, block websites and IP’s, downgrade iOS, troubleshoot weird iTunes errors, and much more.
If you need to edit your hosts file but you’re not savvy with Terminal and you’d rather avoid the command line entirely, check out the free Hosts preference pane. The third party Hosts panel lets you add, edit, and remove host files easily. If an item is checked, it’s stored in the hosts file, if it’s unchecked, it’s removed rather than commented out but continues to be stored in the preference panel for future use. Simple, easy to use, low maintenance, and should be perfect for anyone who needs to modify /etc/hosts but doesn’t want to get their hands too dirty with nano or vi.
Hosts works with most new versions of Mac OS x, including OS X 10.6.8, 10.7+, and 10.8 Mountain Lion.
Ideally the Hosts preference pane would include the management and multiple hosts file juggling that GasMask provides, but perhaps that’ll come in a future version.
Update: if changes aren’t taking effect, manually flush dns cache with dscacheutil.