# domain name unknown

## JnZn558

at the start I see there "myhostname.unknown_domain.

I have in /etc/conf.d/hostname

hostname="myhostname"

/etc/conf.d/net

dns_domain_lo="testdomain"

/etc/hosts

127.0.0.1     testit     localhost

and

and when I try to get info about it by typing hostname, I get

myhostname, it is correkt. but hostname -d results lookup failure.

what do I wrong or not yet done?

----------

## golagoda

To fix this I made my /etc/hosts file like this;

```

127.0.0.1       localhost.gola localhost

::1             localhost.gola localhost

127.0.0.1           gola.gola gola

::1                 gola.gola gola

```

for hostname and domain as gola.

Hope it works for you, just obviously replace it with whatever is appropriate for your desired domain and hostname.

EDIT: Forgot to add, the word after the dot is the domain.

----------

## aidanjt

Yeah I just added this line to /etc/hosts:

```
127.0.0.2        machinename.domain         machinename
```

That does the trick nicely.

----------

## JnZn558

thx you, its well done

----------

## tomk

Moved from Gentoo Chat to Networking & Security as it's not about Gentoo itself.

----------

