|
-
Oct 16th, 2010, 11:01 AM
#1
Thread Starter
Hyperactive Member
Help Utilizing Hosts File
Over the past few weeks, I've been reading up on some information on using a hosts file in parallel with DNS lookups. However I'm still not able to find out any real pertinent information on the actual file itself.
One thing I'm not very clear on is the syntax of the file itself. The default hosts file for Windows 7 shows two entries that are commented out.
127.0.0.1 localhost loopback
::1 localhost
Which I understand that 127.0.0.1 is the local ethernet port (you ping this to test the internal functionality of the port). Now I've also been told, and have seen examples, of rerouting ad-sites to the localhost IP so that the sites' DNS doesn't resolve to it's intended IP address, instead resolving to the localhost IP. So, with that in mind, I'm assuming that the following syntax
127.0.0.1 www.someadsite.com
states that when your web browser attempts to resolve the DNS for www.someadsite.com, it looks to the hosts file first and resolves the DNS there (which would mean that www.someadsite.com would resolve to localhost). Am I reading this correctly? That the hosts file is essentially a "key-value" listing?
If this is the case, then my next question would be how to utilize it in practical scenarios. You can use the hosts file to potentially speed up lookups by explicitly stating that some site is hosted at some IP but whenever I seem to try and implement this, it never works. IE either states that it can't find the web page (I'm told this happens when the site has multiple IP addresses) or it just simply stalls and stays at a blank tab.
Any information on this topic would be greatly appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|