Conflicting http_host definitions for the www subdomain in ContextRouter

I use ContextRouter to host a handful of different domains and I see this error message in the log from time to time:

[ContextRouter] You may have conflicting http_host definitions for the www subdomain.
Overwriting context web with for host

I’m not aware of any specific problem related to this but I’d like to know what it means and whether it makes any difference to anything. I use web rules to redirect www to the bare domain so I’m not sure how a www-prefixed domain is even reaching MODX.


You either have a context that has the same value for http_host as the context “web”, or maybe the value of MODX_HTTP_HOST in your MODx config file corresponds to a different context than “web”.

The error occurs after your clear the cache, when the program gathers all the http_host values from the different contexts to save them to the cache. There is no request with a www-prefix.

1 Like

Perhaps you’ve specified the hosts with www, and also have includeWww enabled. Or have explicitly added www host aliases to the context.

1 Like

It looks like includeWww was the culprit. I haven’t specified any hosts with “www” but includeWww was enabled and disabling it seems to have stopped the error from showing up.

I thank you both!

1 Like