Editing Hosts File to Redirect URL to different IP Address
When I edit my hosts file to redirect a URL to a specific IP address, nothing happens. My hosts file looks like this - 199.204.138.195 zionica.com
this is in the directory /private/etc/hosts
. I am not all that familiar with the Terminal nor it's commands so I'm having difficulty troubleshooting my problem.
The one thing I can think of is that I followed the following tutorial in an attempt to have SwitchHosts work in Firefox. https://addons.mozilla.org/en-US/firefox/addon/switchhosts/reviews/286862/ Is there a way to reverse these steps? Would that even solve my problem?
Try running dscacheutil -flushcache as it sounds like it's not correctly doing flushing the cache to update it.
Note that zionica.com and www.zionica.com (or any other subdomain that comes before the word zionica) is a different domain, and the line as listed will not trap everything automatically by listing only the Second Level Domain.
www.zionica.com
www
is a third-level domain, more commonly referred to as a 'sub-domain'.zionica
is the second-level domain. This word/placement on it's own generally does not have a more specific name.com
is a Top-Level Domain (TLD). Just like co, cc, org, net, ca, jp, uk, me, info, etc. (Everything except etc is a TLD.)
You can stuff multiple names into a single IP address line, so this is valid:
199.204.138.195 zionica.com www.zionica.com