Title: [Plugin: WP Super Cache] SERVER_NAME vs. HTTP_HOST
Last modified: August 20, 2016

---

# [Plugin: WP Super Cache] SERVER_NAME vs. HTTP_HOST

 *  [admintiger](https://wordpress.org/support/users/admintiger/)
 * (@admintiger)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-server_name-vs-http_host/)
 * I noticed revisions in Changeset 556622 to “Use HTTP_HOST instead of SERVER_NAME
   because nginx has problems with it.” SERVER_NAME is inherently more reliable 
   where it is set, because its value is set by the server, whereas HTTP_HOST is
   taken from the HTTP request header and is whatever a client used for a request.
   Because of that, wouldn’t it be better to use SERVER_NAME where it is set and
   to use the less-reliable HTTP_HOST only where necessary to support nginx or other
   servers that don’t set it.
 * [http://wordpress.org/extend/plugins/wp-super-cache/](http://wordpress.org/extend/plugins/wp-super-cache/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Konstantin Kovshenin](https://wordpress.org/support/users/kovshenin/)
 * (@kovshenin)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-server_name-vs-http_host/#post-2808725)
 * [@admintiger](https://wordpress.org/support/users/admintiger/) the current trunk
   version seems to fix this.
 *  [Tim Hyde](https://wordpress.org/support/users/livingos/)
 * (@livingos)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-server_name-vs-http_host/#post-2808987)
 * In what way does the current trunk ‘fix’ this.
 * Supercache 1.1 is totally broken on nginx because SERVER_NAME does not exist.
 * As admintiger suggests, the plugin should default back to HTTP_HOST when SERVER_NAME
   doesn’t exist. But the current version doesn’t do this.
 * This needs addressing urgently.
 *  [Konstantin Kovshenin](https://wordpress.org/support/users/kovshenin/)
 * (@kovshenin)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-server_name-vs-http_host/#post-2808988)
 * [@livingos](https://wordpress.org/support/users/livingos/) as I mentioned earlier,
   the current trunk version reverts that change back to using the HTTP_HOST header:
   [http://plugins.svn.wordpress.org/wp-super-cache/trunk/wp-cache-base.php](http://plugins.svn.wordpress.org/wp-super-cache/trunk/wp-cache-base.php)
 * Don’t confuse “trunk” with “1.1” or “latest stable”.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: WP Super Cache] SERVER_NAME vs. HTTP_HOST’ is closed to new 
replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Konstantin Kovshenin](https://wordpress.org/support/users/kovshenin/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-server_name-vs-http_host/#post-2808988)
 * Status: not resolved