Home All Groups Group Topic Archive Search About

Hosts file questions - format, duplicates, IP addresses

Author
3 Apr 2005 8:41 PM
John
Does it matter if the space between 127.0.0.1 and the
domain name is a tab, or must it be a space?
Do duplicate entries cause any problems.
What's the difference between:
127.0.0.1   example.com
127.0.0.1   *.example.com
127.0.0.1   www.example.com
Wouldn't the first one take care of all three?
Can IP address ranges be used?
127.0.0.1   123.123.123.*
127.0.0.1   123.123.*.*

John

Author
3 Apr 2005 9:07 PM
Steve Parry [MVP]
John fumbled, fiddled and fingered:

> Does it matter if the space between 127.0.0.1 and the
> domain name is a tab, or must it be a space?

In a txt file a tab is just a number of spaces, so no it does'nt matter

> Do duplicate entries cause any problems.
> What's the difference between:
> 127.0.0.1   example.com
> 127.0.0.1   *.example.com
> 127.0.0.1   www.example.com

Each of the is treated seperately.

You cannot use wildcards such as ? or *

> Wouldn't the first one take care of all three?
> Can IP address ranges be used?
> 127.0.0.1   123.123.123.*
> 127.0.0.1   123.123.*.*
>

No




Author
3 Apr 2005 11:48 PM
George Hester
"John" <anonym***@discussions.microsoft.com> wrote in message news:1e2001c5388d$78c46c10$a601280a@phx.gbl...
> Does it matter if the space between 127.0.0.1 and the
> domain name is a tab, or must it be a space?

Doesn't matter.


> Do duplicate entries cause any problems.
> What's the difference between:

1 > 127.0.0.1   example.com
2 > 127.0.0.1   *.example.com
3 > 127.0.0.1   www.example.com

1 is OK
2 won't work
3 is OK but is different than 1


> Wouldn't the first one take care of all three?

No

> Can IP address ranges be used?
> 127.0.0.1   123.123.123.*
> 127.0.0.1   123.123.*.*
>

Nada.  Domain names and subdomain names ONLY.

> John

--
George Hester
_________________________________