Hosts file question

Norwood

Lowly IT Drone
Member
VIP
Local time
7:58 PM
Messages
105
Location
A bit south o' Boston
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 Computer

Computer type
PC/Desktop
OS
Windows 7 64bit
CPU
AMD Phenom II X4 955 Black Edition Deneb 3.2GHz Quad-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX
Memory
G.SKILL Ripjaws DDR3 SDRAM DDR3 1600 (PC3 12800)
Graphics Card(s)
SAPPHIRE 100284L Radeon HD 5750 1GB 128-bit GDDR5 PCI-E
Sound Card
Audigy
Monitor(s) Displays
2 x 22" Widescreens
Hard Drives
System Drive: OCZ Vertex 3.20 120GB SSD
Internal: 2x 1TB Seagates
External: 1 TB Seagate
Case
Cooler Master Elite 310 ATX
Cooling
Arctic Cooling Freezer 7 Pro Rev.2 92mm Liquid Cooling
Keyboard
Microsoft Comfort Curve Keyboard 2000 v1.0
Mouse
Logitech G5 w/ full 36g weighted cartridge
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 Computer

Computer Manufacturer/Model Number
HP Pavillion dv-7 1005 Tx
OS
Win 8 Release candidate 8400
CPU
[email protected]
Memory
4 gigs
Graphics Card(s)
Nvidia 9600M
Sound Card
HD built-in
Monitor(s) Displays
17" Wxga
Screen Resolution
1440x900
Cooling
none
Internet Speed
45Mb down 5Mb up
I understand that in the case of google it encompasses the entire domain. I was using "google" as an example.
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 64bit
CPU
AMD Phenom II X4 955 Black Edition Deneb 3.2GHz Quad-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX
Memory
G.SKILL Ripjaws DDR3 SDRAM DDR3 1600 (PC3 12800)
Graphics Card(s)
SAPPHIRE 100284L Radeon HD 5750 1GB 128-bit GDDR5 PCI-E
Sound Card
Audigy
Monitor(s) Displays
2 x 22" Widescreens
Hard Drives
System Drive: OCZ Vertex 3.20 120GB SSD
Internal: 2x 1TB Seagates
External: 1 TB Seagate
Case
Cooler Master Elite 310 ATX
Cooling
Arctic Cooling Freezer 7 Pro Rev.2 92mm Liquid Cooling
Keyboard
Microsoft Comfort Curve Keyboard 2000 v1.0
Mouse
Logitech G5 w/ full 36g weighted cartridge
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
Back
Top