> Isn't $_SERVER['HTTP_HOST'] basically data supplied by the browser?
> Shouldn't WordPress use $_SERVER['SERVER_NAME'] instead, which is
> data provided by the web server?
Right. I forgot to mention something. Our web servers are not directly
reachable from the outside world and are accessed though an Apache
server running mod_proxy. The proxy will direct the requests to the
right machines and will thus change the HTTP_HOST in the internal
request (from the proxy to the web server)...
This causes the host mismatch. The correct host is supplied in
X-Forwarded-Host, but there is probably a way to solve this Apache
Basically, I'm aware that this is a very special issue and I only
posted it as I noticed some other people had similar problems with
canonical URLs. Of course, they may be caused by something different.
Thus, I'm not sure if this issue really needs to be considered, but
I thought it's maybe worth a pointer.