Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed ubuntu on my computer at work because I think it is a perfect system for work which I do but I got some issues. I can't resolve domains from windows DNS server. Basically, we have two servers, one is Windows server (DNS sever) and another one is ubuntu 12.04 (LAMP). So every time when I create new project I have to create new alias on DNS server for example project1.localdomain.local which points to ubuntu server. On ubuntu server I have to create the project in directory /var/www/project1/htdocs. Everything works for computers in local network with windows or for macs. So basically when I am trying open a link http://project1.localdomain.local in a browser it works. But when I do it on my computer with fresh ubuntu installation it doesn't. It looks like ubuntu can't resolve local domain where DNS server is.

So my network looks like that: - DNS server - windows server domain - test

I've already tried resolved the problem adding lines to /etc/resolve.conf file

domain test

/etc/NetworkManager/NetworkManager.conf file I commented out line


/etc/dhcp/dhclient.conf I added lines

supersede domain-name "test";
prepend domain-name-servers,;

But it doesn't work.

On windows or mac I don't have to do any additional configuration to make it work.

This is the contents of /etc/nsswitch.conf:

passwd:         compat
group:          compat
shadow:         compat

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
share|improve this question
Hi Sneetsher, this is the contents: inline code in backticks – Rafal B Feb 5 '14 at 10:51
up vote 2 down vote accepted

Change hosts line:

hosts:          files dns mdns4_minimal [NOTFOUND=return] mdns4

.local is used by mDNS (Avahi), dns should comes first.


share|improve this answer
It was exactly that, thank you very much Sneetsher, you save me a lot of time. – Rafal B Feb 5 '14 at 21:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.