AH00558 low
Apache AH00558: Could not reliably determine the server's fully qualified domain name
Apache warns at startup that no global ServerName is set and falls back to a guessed IP.
What you see
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
What’s actually happening
This shows up every time you start or reload Apache, on the console and in the error log. It's a warning, not a failure — Apache still starts and serves traffic. It just couldn't resolve its own FQDN, so it picked the first address it found (often 127.0.1.1 on Debian/Ubuntu). The only real downside: redirects Apache generates itself, and the default vhost name, use that guessed value.
Common causes
- No global ServerName directive anywhere in the configuration.
- The hostname in /etc/hostname doesn't resolve to a usable FQDN via /etc/hosts or DNS.
- A fresh install — Apache ships without a ServerName and expects you to set it.
- Every ServerName lives inside a <VirtualHost> block, but none is set at the server (global) level, which is what this check wants.
- 127.0.1.1 maps to the short hostname in /etc/hosts with no fully qualified name attached.
How to fix it
- Set a global ServerNameAdd ServerName your.domain.com (or the server's primary hostname) at the top level of the main config. On Debian/Ubuntu the clean spot is a new file: echo 'ServerName your.domain.com' | sudo tee /etc/apache2/conf-available/servername.conf, then sudo a2enconf servername. On RHEL/CentOS, add the line to /etc/httpd/conf/httpd.conf.
- Reload and confirm it's gonesudo apachectl configtest, then sudo systemctl reload apache2. Restart once more and the AH00558 line should not reappear in journalctl -u apache2.
- Or fix the host's name resolutionIf you'd rather the server resolve its own FQDN, make sure /etc/hosts has a line like 127.0.1.1 server.domain.com server and that hostname -f returns the full name. Apache then derives the FQDN without an explicit ServerName.
Stop it recurring
Set a global ServerName directive on every fresh Apache install before putting it into service.
Related errors