Title: PHP Warning: Undefined array key &#8220;HTTP_HOST&#8221;
Last modified: August 10, 2025

---

# PHP Warning: Undefined array key “HTTP_HOST”

 *  Resolved [wabetainfo](https://wordpress.org/support/users/wabetainfo/)
 * (@wabetainfo)
 * [8 months ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-http_host-5/)
 * Hi. I see this warning multiple times in my log file:
   `PHP Warning: Undefined
   array key "HTTP_HOST" in /wp-content/plugins/wp-cloudflare-page-cache/libs/fallback_cache.
   class.php on line 443`Plugin version: 5.1.4Thank you!

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

 *  Plugin Support [Kush](https://wordpress.org/support/users/kushnamdev/)
 * (@kushnamdev)
 * [7 months, 4 weeks ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-http_host-5/#post-18602554)
 * Hi there,
 * Thanks for reporting this. We’re not able to reproduce this on our side, so we’ll
   need a bit more detail to investigate:
    - The **full error message **(from your PHP error log).
    - Your **WordPress and PHP versions**.
 * With this information we can check if it’s coming directly from the plugin or
   being triggered by something else in your setup.
 * Best regards,
 *  Thread Starter [wabetainfo](https://wordpress.org/support/users/wabetainfo/)
 * (@wabetainfo)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-http_host-5/#post-18603999)
 * Hi,
   Thanks for your message. I fixed the issue by adding this code to the wp-
   config file:
 * if ( ! isset( $_SERVER[‘HTTP_HOST’] ) || empty( $_SERVER[‘HTTP_HOST’] ) ) {
 *     $_SERVER[‘HTTP_HOST’] = ‘mywebsite.com’;
 * }
   Since I do not have any subdomain, I could use this code without any other 
   conflicts. Thanks again.
 *  Plugin Support [Kush](https://wordpress.org/support/users/kushnamdev/)
 * (@kushnamdev)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-http_host-5/#post-18604028)
 * great thanks for the update.

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

The topic ‘PHP Warning: Undefined array key “HTTP_HOST”’ is closed to new replies.

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

 * 3 replies
 * 2 participants
 * Last reply from: [Kush](https://wordpress.org/support/users/kushnamdev/)
 * Last activity: [7 months, 3 weeks ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-http_host-5/#post-18604028)
 * Status: resolved