<s>
The	O
computer	B-Operating_System
file	I-Operating_System
hosts	B-Protocol
is	O
an	O
operating	O
system	O
file	O
that	O
maps	O
hostnames	B-Protocol
to	O
IP	B-Protocol
addresses	I-Protocol
.	O
</s>
<s>
Originally	O
a	O
file	O
named	O
HOSTS.TXT	B-Protocol
was	O
manually	O
maintained	O
and	O
made	O
available	O
via	O
file	O
sharing	O
by	O
Stanford	O
Research	O
Institute	O
for	O
the	O
ARPANET	O
membership	O
,	O
containing	O
the	O
hostnames	B-Protocol
and	O
address	O
of	O
hosts	B-Protocol
as	O
contributed	O
for	O
inclusion	O
by	O
member	O
organizations	O
.	O
</s>
<s>
The	O
Domain	B-Protocol
Name	I-Protocol
System	I-Protocol
,	O
first	O
described	O
in	O
1983	O
and	O
implemented	O
in	O
1984	O
,	O
automated	O
the	O
publication	O
process	O
and	O
provided	O
instantaneous	O
and	O
dynamic	O
hostname	B-Protocol
resolution	O
in	O
the	O
rapidly	O
growing	O
network	O
.	O
</s>
<s>
In	O
modern	O
operating	O
systems	O
,	O
the	O
hosts	B-Protocol
file	I-Protocol
remains	O
an	O
alternative	O
name	O
resolution	O
mechanism	O
,	O
configurable	O
often	O
as	O
part	O
of	O
facilities	O
such	O
as	O
the	O
Name	B-Protocol
Service	I-Protocol
Switch	I-Protocol
as	O
either	O
the	O
primary	O
method	O
or	O
as	O
a	O
fallback	O
method	O
.	O
</s>
<s>
The	O
hosts	B-Protocol
file	I-Protocol
is	O
one	O
of	O
several	O
system	O
facilities	O
that	O
assists	O
in	O
addressing	O
network	O
nodes	O
in	O
a	O
computer	O
network	O
.	O
</s>
<s>
It	O
is	O
a	O
common	O
part	O
of	O
an	O
operating	O
system	O
's	O
Internet	B-Protocol
Protocol	I-Protocol
(	O
IP	O
)	O
implementation	O
,	O
and	O
serves	O
the	O
function	O
of	O
translating	O
human-friendly	O
hostnames	B-Protocol
into	O
numeric	O
protocol	O
addresses	O
,	O
called	O
IP	B-Protocol
addresses	I-Protocol
,	O
that	O
identify	O
and	O
locate	O
a	O
host	O
in	O
an	O
IP	B-Protocol
network	I-Protocol
.	O
</s>
<s>
In	O
some	O
operating	O
systems	O
,	O
the	O
contents	O
of	O
the	O
hosts	B-Protocol
file	I-Protocol
is	O
used	O
preferentially	O
to	O
other	O
name	O
resolution	O
methods	O
,	O
such	O
as	O
the	O
Domain	B-Protocol
Name	I-Protocol
System	I-Protocol
(	O
DNS	B-Protocol
)	O
,	O
but	O
many	O
systems	O
implement	O
name	B-Protocol
service	I-Protocol
switches	I-Protocol
,	O
e.g.	O
,	O
nsswitch.conf	O
for	O
Linux	B-Application
and	O
Unix	B-Application
,	O
to	O
provide	O
customization	O
.	O
</s>
<s>
Unlike	O
remote	O
DNS	B-Protocol
resolvers	O
,	O
the	O
hosts	B-Protocol
file	I-Protocol
is	O
under	O
the	O
direct	O
control	O
of	O
the	O
local	O
computer	O
's	O
administrator	O
.	O
</s>
<s>
The	O
hosts	B-Protocol
file	I-Protocol
contains	O
lines	O
of	O
text	O
consisting	O
of	O
an	O
IP	B-Protocol
address	I-Protocol
in	O
the	O
first	O
text	O
field	O
followed	O
by	O
one	O
or	O
more	O
host	B-Protocol
names	I-Protocol
.	O
</s>
<s>
The	O
host	B-Protocol
names	I-Protocol
map	O
to	O
the	O
IPs	O
,	O
not	O
vice	O
versa	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
typical	O
hosts	B-Protocol
file	I-Protocol
may	O
contain	O
the	O
following	O
:	O
</s>
<s>
This	O
example	O
only	O
contains	O
entries	O
for	O
the	O
loopback	B-Protocol
addresses	O
of	O
the	O
system	O
and	O
their	O
host	B-Protocol
names	I-Protocol
,	O
a	O
typical	O
default	O
content	O
of	O
the	O
hosts	B-Protocol
file	I-Protocol
.	O
</s>
<s>
The	O
example	O
illustrates	O
that	O
an	O
IP	B-Protocol
address	I-Protocol
may	O
have	O
multiple	O
host	B-Protocol
names	I-Protocol
(	O
localhost	B-Protocol
and	O
loopback	B-Protocol
)	O
,	O
and	O
that	O
a	O
host	B-Protocol
name	I-Protocol
may	O
be	O
mapped	O
to	O
both	O
IPv4	B-Protocol
and	O
IPv6	B-Protocol
IP	B-Protocol
addresses	I-Protocol
,	O
as	O
shown	O
on	O
the	O
first	O
and	O
second	O
lines	O
respectively	O
.	O
</s>
<s>
The	O
location	O
of	O
the	O
hosts	B-Protocol
file	I-Protocol
in	O
the	O
file	B-Application
system	I-Application
hierarchy	O
varies	O
by	O
operating	O
system	O
.	O
</s>
<s>
It	O
is	O
usually	O
named	O
hosts	B-Protocol
,	O
without	O
an	O
extension	O
.	O
</s>
<s>
Operating	O
System	O
Version(s )	O
Location	O
Unix	B-Application
,	O
Unix-like	B-Operating_System
,	O
POSIX	O
/etc/hostsMicrosoft	O
Windows	B-Application
3.1	I-Application
%WinDir%	O
\HOSTS	O
95	B-Application
,	O
98	B-Device
,	O
ME	B-Device
%WinDir%	O
\hosts	O
NT	B-Device
,	O
2000	B-Application
,	O
XP	B-Application
,	O
2003	B-Application
,	O
Vista	B-Application
,	O
2008	B-Device
,	O
7	B-Device
,	O
2012	B-Device
,	O
8	B-Application
,	O
10	B-Operating_System
,	O
11	B-Application
%SystemRoot%	O
\System32\drivers\etc\hosts	O
Windows	B-Operating_System
Mobile	I-Operating_System
,	O
Windows	B-Protocol
Phone	I-Protocol
Registry	B-Protocol
key	I-Protocol
under	O
HKEY_LOCAL_MACHINE	O
\Comm\Tcpip\Hosts	O
Apple	O
Macintosh	B-Device
9	O
and	O
earlier	O
Preferences	O
or	O
System	O
folder	O
Mac	B-Application
OS	I-Application
X	I-Application
10.0	O
–	O
10.1.5	O
(	O
Added	O
through	O
NetInfo	O
or	O
niload	O
)	O
Mac	B-Application
OS	I-Application
X	I-Application
10.2	O
and	O
newer	O
/etc/hosts	B-Protocol
(	O
a	O
symbolic	B-Application
link	I-Application
to	O
/private/etc/hosts	O
)	O
Novell	B-Operating_System
NetWare	I-Operating_System
SYS	O
:	O
\hosts	O
OS/2	B-Application
,	O
eComStation	B-Device
,	O
ArcaOS	B-Device
"	O
bootdrive	O
"	O
:	O
\mptn\\	O
Symbian	B-Operating_System
Symbian	B-Operating_System
OS	I-Operating_System
6.1	O
–	O
9.0	O
C:\system\data\hosts	O
Symbian	B-Operating_System
OS	I-Operating_System
9.1	O
+	O
C:\private\10000882\hosts	O
MorphOS	B-Operating_System
NetStack	O
ENVARC:sys/net/hosts	O
AmigaOS	B-Application
<	O
4	O
AmiTCP:db/hosts	O
4	O
DEVS:Internet/hosts	O
AROS	B-Application
ENVARC:AROSTCP/db/hosts	O
Android	B-Application
/etc/hosts	B-Protocol
(	O
a	O
symbolic	B-Application
link	I-Application
to	O
/system/etc/hosts	O
)	O
iOS	B-Application
iOS	B-Application
2.0	O
and	O
newer	O
/etc/hosts	B-Protocol
(	O
a	O
symbolic	B-Application
link	I-Application
to	O
/private/etc/hosts	O
)	O
TOPS-20	B-Operating_System
<	O
SYSTEM>HOSTS.TXT	O
Plan	B-Operating_System
9	I-Operating_System
/lib/ndb/hosts	O
BeOS	B-Application
/boot/beos/etc/hosts	O
Haiku	B-Language
/system/settings/network/hosts	O
OpenVMS	B-Operating_System
UCX	O
UCX$HOST	O
TCPware	B-Protocol
TCPIP$HOST	O
RISC	B-Operating_System
OS	I-Operating_System
3.7	O
,	O
5	O
!	O
Boot.Resources	O
.	O
</s>
<s>
The	O
ARPANET	O
,	O
the	O
predecessor	O
of	O
the	O
Internet	O
,	O
had	O
no	O
distributed	O
host	B-Protocol
name	I-Protocol
database	O
.	O
</s>
<s>
There	O
was	O
no	O
method	O
for	O
ensuring	O
that	O
all	O
references	O
to	O
a	O
given	O
node	O
in	O
a	O
network	O
were	O
using	O
the	O
same	O
name	O
,	O
nor	O
was	O
there	O
a	O
way	O
to	O
read	O
the	O
hosts	B-Protocol
file	I-Protocol
of	O
another	O
computer	O
to	O
automatically	O
obtain	O
a	O
copy	O
.	O
</s>
<s>
The	O
small	O
size	O
of	O
the	O
ARPANET	O
kept	O
the	O
administrative	O
overhead	O
small	O
to	O
maintain	O
an	O
accurate	O
hosts	B-Protocol
file	I-Protocol
.	O
</s>
<s>
As	O
local	O
area	O
TCP/IP	B-Protocol
computer	O
networks	O
gained	O
popularity	O
,	O
however	O
,	O
the	O
maintenance	O
of	O
hosts	B-Protocol
files	I-Protocol
became	O
a	O
larger	O
burden	O
on	O
system	O
administrators	O
as	O
networks	O
and	O
network	O
nodes	O
were	O
being	O
added	O
to	O
the	O
system	O
with	O
increasing	O
frequency	O
.	O
</s>
<s>
Standardization	O
efforts	O
,	O
such	O
as	O
the	O
format	O
specification	O
of	O
the	O
file	O
HOSTS.TXT	B-Protocol
in	O
RFC	O
952	O
,	O
and	O
distribution	O
protocols	O
,	O
e.g.	O
,	O
the	O
hostname	B-Protocol
server	O
described	O
in	O
RFC	O
953	O
,	O
helped	O
with	O
these	O
problems	O
,	O
but	O
the	O
centralized	O
and	O
monolithic	O
nature	O
of	O
hosts	B-Protocol
files	I-Protocol
eventually	O
necessitated	O
the	O
creation	O
of	O
the	O
distributed	O
Domain	B-Protocol
Name	I-Protocol
System	I-Protocol
(	O
DNS	B-Protocol
)	O
.	O
</s>
<s>
On	O
some	O
old	O
systems	O
a	O
file	O
named	O
networks	O
is	O
present	O
that	O
is	O
similar	O
to	O
a	O
hosts	B-Protocol
file	I-Protocol
,	O
containing	O
names	O
of	O
networks	O
.	O
</s>
<s>
In	O
its	O
function	O
of	O
resolving	O
host	B-Protocol
names	I-Protocol
,	O
the	O
hosts	B-Protocol
file	I-Protocol
may	O
be	O
used	O
to	O
define	O
any	O
hostname	B-Protocol
or	O
domain	O
name	O
for	O
use	O
in	O
the	O
local	O
system	O
.	O
</s>
<s>
Redirecting	O
local	O
domains	O
Some	O
web	O
service	O
and	O
intranet	B-General_Concept
developers	O
and	O
administrators	O
define	O
locally	O
defined	O
domains	O
in	O
a	O
LAN	B-General_Concept
for	O
various	O
purposes	O
,	O
such	O
as	O
accessing	O
the	O
company	O
's	O
internal	O
resources	O
or	O
to	O
test	O
local	O
websites	O
in	O
development	O
.	O
</s>
<s>
Internet	O
resource	O
blocking	O
Entries	O
in	O
the	O
hosts	B-Protocol
file	I-Protocol
may	O
be	O
used	O
to	O
block	O
online	O
advertising	O
,	O
or	O
the	O
domains	O
of	O
known	O
malicious	O
resources	O
and	O
servers	O
that	O
contain	O
spyware	O
,	O
adware	O
,	O
and	O
other	O
malware	O
.	O
</s>
<s>
This	O
may	O
be	O
achieved	O
by	O
adding	O
entries	O
for	O
those	O
sites	O
to	O
redirect	O
requests	O
to	O
another	O
address	O
that	O
does	O
not	O
exist	O
or	O
to	O
a	O
harmless	O
destination	O
such	O
as	O
the	O
local	B-Protocol
machine	I-Protocol
.	O
</s>
<s>
Commercial	O
software	O
applications	O
may	O
be	O
used	O
to	O
populate	O
the	O
hosts	B-Protocol
file	I-Protocol
with	O
entries	O
of	O
known	O
undesirable	O
Internet	O
resources	O
automatically	O
.	O
</s>
<s>
In	O
addition	O
,	O
user-created	O
hosts	B-Protocol
files	I-Protocol
which	O
block	O
nuisance	O
servers	O
are	O
publicly	O
available	O
.	O
</s>
<s>
Fravia	O
described	O
these	O
files	O
variously	O
as	O
"	O
scrolls	O
"	O
,	O
"	O
precious	O
"	O
,	O
and	O
"	O
powerful	O
"	O
in	O
his	O
anti-advertisement	O
pages	O
,	O
where	O
this	O
usage	O
of	O
hosts	B-Protocol
was	O
first	O
published	O
.	O
</s>
<s>
Software	O
piracy	O
Some	O
pirated	O
versions	O
of	O
software	O
rely	O
on	O
a	O
modified	O
hosts	B-Protocol
file	I-Protocol
to	O
prevent	O
software	O
from	O
contacting	B-License
the	I-License
activation	I-License
servers	I-License
of	I-License
the	I-License
publisher	I-License
,	O
although	O
activation	B-License
servers	I-License
sometimes	O
appear	O
in	O
general	O
purpose	O
hosts	B-Protocol
files	I-Protocol
.	O
</s>
<s>
The	O
hosts	B-Protocol
file	I-Protocol
may	O
present	O
an	O
attack	O
vector	O
for	O
malicious	O
software	O
.	O
</s>
<s>
The	O
widespread	O
computer	O
worm	O
Mydoom.B	O
blocked	O
users	O
from	O
visiting	O
sites	O
about	O
computer	O
security	O
and	O
antivirus	B-Application
software	I-Application
and	O
also	O
affected	O
access	O
from	O
the	O
compromised	O
computer	O
to	O
the	O
Microsoft	O
Windows	O
Update	O
website	O
.	O
</s>
<s>
In	O
some	O
cases	O
,	O
malware	O
has	O
modified	O
the	O
library	O
responsible	O
for	O
loading	O
the	O
hosts	B-Protocol
file	I-Protocol
in	O
order	O
to	O
redirect	O
it	O
to	O
a	O
file	O
it	O
is	O
able	O
to	O
control	O
freely	O
.	O
</s>
