Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Hosts file question

15 Dec 2010   #1
Norwood

 
 
Hosts file question

This is something I've always wondered about manipulating the hosts file.

Can wildcards be used?

For example:

Code:
127.0.0.1       *.google.com
or
Code:
127.0.0.1       *.google.*
Or is each domain or subdomain in need of full qualification?


My System SpecsSystem Spec
.

15 Dec 2010   #2
zigzag3143

Win 8 Release candidate 8400
 
 

Quote   Quote: Originally Posted by Norwood View Post
This is something I've always wondered about manipulating the hosts file.

Can wildcards be used?

For example:

Code:
127.0.0.1       *.google.com
or
Code:
127.0.0.1       *.google.*
Or is each domain or subdomain in need of full qualification?

First one *.google.com un-necessary. "google.com" encompases the entire domain.

Second one, nope cant do (I dont think) "google.*. I am unsure try it.


Then there is the google.com.* (for google.com.au, etc)


Ken J
My System SpecsSystem Spec
15 Dec 2010   #3
Norwood

 
 

I understand that in the case of google it encompasses the entire domain. I was using "google" as an example.
My System SpecsSystem Spec
.


15 Dec 2010   #4
Ztruker

Windows 8.1 Pro X64
 
 

I think what Ken meant was

google.com == *.google.com
orbitz.com == *.orbitz.com

as far as functionality goes, so there is no need for the *.
My System SpecsSystem Spec
Reply

 Hosts file question




Thread Tools





Similar help and support threads
Thread Forum
Just installed new HOSTS file.... a question
I've just installed the latest version of MVPS hosts and notice that the loop back addresses are 0.0.0.0 abd not 127.0.0.1 as they had been before. I've an idea the change might have to do with IPV6 and I am not set up for that. Please, is that so, or do I need to find another source for a ...
General Discussion
Hosts file ignored and replaced with hosts.original
Hello. I am trying to use the hosts file. However both pings and web addresses still bypass the hosts file. I noticed that there is another file in the C:\Windows\System32\drivers\etc directory called 'hosts.original'. When ever I delete this file, it reappears seconds later. I have made sure that...
General Discussion
Hosts File
Hey, I was wondering, is there any internet performance gain if you put a commonly used website's IP (like Google) in your Hosts file, so it doesn't need to ask a DNS server? I mean, because I have 30 websites I go on at least 10 times each day, and it lags when I open all of them :D Thanks!
General Discussion
Hosts file-S??
can the hosts file be changed to, or amended by, another file? IOW can there be a file named xyz that essentially replaces the hosts file, or adds entries to it? Possibly by a registry key or configuration setting? Of course it could by altering library fxns, but by other "simpler" means? ...
System Security
HOSTS File - Create a "Edit HOSTS file" Shortcut
How to Create a "Edit HOSTS file" Shortcut in Windows 7 and Vista The HOSTS file is a .txt file used in Vista and Windows 7 to map hostnames to IP addresses. Your computer checks this file first to resolve any network names to its corresponding IP address before it tries to check the Internet....
Tutorials
HOSTS file
I setup a hosts file in windows xp in order to use my website locally using the exact domain name by editing the hosts file by adding the line: 127.0.0.1 www.test.com This should resolve my local ip address for the test.com site and if apache is running, then it should load the website...
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 13:12.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App