Nelson's log

Ubuntu and FQDNs

Setting the fully qualified domain name on an Ubuntu host is way too hard. The Internet is full of confusing advice. Most people first seem to notice the FQDN isn’t right when setting up Apache, but it’s a broader problem than that. (You can fix Apache just by giving an explicit ServerName directive.) “hostname -f” should return the right thing.

My solution:

And now “hostname” returns “wi”, “hostname -f” returns “”. Note I don’t have a reverse DNS entry for that IP address. (I do have forward DNS so resolves, but I don’t think it’s used.)

Part of the confusion is a lot of people (and Ubuntu by default) want you to do something like wi

This kind of works, despite the odd loopback address number. But it’s not really correct: your FQDN should resolve to a routeable IP address, not a loopback.