Hosts file questions - format, duplicates, IP addresses

  • Thread starter Thread starter John
  • Start date Start date
J

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
 
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
 
John said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top