You also have to set the correct domain name in /etc/resolv.conf, so it'll know where to look.