Question: I added an entry to my hosts file for the development of a website.

I put a new line in `/etc/hosts`

```
xx.xx.xx.xx www.mysite.com

```

But even after a reboot when I use chrome or firefox the host name is not resolved to the IP I put in the file.

I'm running Fedora 14 x86\_64.

Answer: 
Hum, don't you have /etc/resolv.conf?

There should be a line:

> 
> lookup file bind
> 
> 
> 

Meaning the system's resolver will look in /etc/hosts (file) first and if it can't found will ask the configured name server(s) in the same file (bind is a DNS server). The order is important.

No need to reboot it will look in the /etc/resolv.conf each time to know how to resolve names.

Usually the dhcp client will override the content of /etc/resolv.conf, one some systems (most? all?) you can create /etc/resolv.conf.tail, its content will be appended to /etc/resolv.conf after the override.

So unless I'm all wrong or your system is different, you know how to fix it now :)

EDIT: on some systems now they seem to use /etc/nsswitch.conf for the resolution order, so not everything is in /etc/resolv.conf.

EDIT2: "The introduction of the GNU C Library 2.0 was accompanied by the introduction of the “Name Service Switch” (NSS). Refer to man 5 nsswitch.conf and The GNU C Library Reference Manual for more details." Seems like another GNU weirdness, argh. There used to be one way to do stuff, which made learning and administration easier. Sounds like windows practices (don't care about others, everyone uses our stuff).
Something is caching the wrong information on the way. Try `nscd -i hosts` and try again.