I am confused though, as to why you would redirect someone else's domain to go to another party's site? It'd be like if I changed it so every time someone typed google.com it went to duckduckgo.com. Yeah, it might be more convenient for me, but it's... kinda breaking the web? Just for yourself, I guess.
Google.com to DuckDuckGo.com is an exaggeration. I don't think people should redirect MSN to CNN; that's just confusing.
I think it's fine to redirect amazon.co, amazo.com, amazn.com to amazon.com. Could a unique site named "amazn.com" exist? Yes, but I would prefer it to go where I expected. Similar/typo URLs are often related to malware (but not always).
I seem to remember localhost.com had a landing page telling users "You mean to go to localhost".
But yeah, don't use this if you're afraid to redirect your own hosts. If you're like me and want to type "HackerNews.com" because you prefer it landing here.. then use the script.
This script should install this to your hosts file on unix/windows.
The change is: 209.216.230.240 hackernews.com www.hackernews.com
Feel free to check my work. I'm just sharing in case anyone else wants to give it a go.