Title: Custom HTTP Headers Missing
Last modified: June 8, 2021

---

# Custom HTTP Headers Missing

 *  Resolved [Amar Ilindra](https://wordpress.org/support/users/amarilindra/)
 * (@amarilindra)
 * [5 years ago](https://wordpress.org/support/topic/custom-http-headers-missing/)
 * I’m adding custom HTTP headers to a few of my blog posts as follows
 *     ```
       add_action('template_redirect', 'gd_custom_http_headers');
   
       function gd_custom_http_headers() {
   
          // our logic based on post ID
          header('X-Robots-Tag: nofollow');
   
          // sometimes
          header('X-GD-API-KEY: xxxxxxxxxxxxxxxxxxxx');
   
       }
       ```
   
 * 1. It works fine initially “with” and “without” cache buster parameter swcfpc
   =1
 * 2. After few days (2-3 days), all my custom headers were missing. However, if
   I log in and add swcfpc=1 parameter, I could see my custom headers correctly.
 * 3. When I hit “Purge whole cache”, it started working again temporarily for 2-
   3 days.
 * I’m not sure where I’m doing it wrong.
 * Thank you
 * Note: Website is running on LiteSpeed server and FlyingPress for files optimizations.
   I have already disabled FlyingPress cache and enabled Fallback cache in your 
   plugin.
    -  This topic was modified 5 years ago by [Amar Ilindra](https://wordpress.org/support/users/amarilindra/).
      Reason: Code formatting
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-http-headers-missing%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [Amar Ilindra](https://wordpress.org/support/users/amarilindra/)
 * (@amarilindra)
 * [5 years ago](https://wordpress.org/support/topic/custom-http-headers-missing/#post-14535753)
 * Hi [@isaumya](https://wordpress.org/support/users/isaumya/)
 * Your feedback on this is really helpful.
 * Thank you
 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [5 years ago](https://wordpress.org/support/topic/custom-http-headers-missing/#post-14535802)
 * Hi [@amarilindra](https://wordpress.org/support/users/amarilindra/),
    Can you
   try enabling the fallback cache and then inside the fallback cache turn on the
   option for saving headers. See if it works after that.
 *  Thread Starter [Amar Ilindra](https://wordpress.org/support/users/amarilindra/)
 * (@amarilindra)
 * [5 years ago](https://wordpress.org/support/topic/custom-http-headers-missing/#post-14535823)
 * Hi [@isaumya](https://wordpress.org/support/users/isaumya/)
 * The fallback cache is already enabled and now as you suggested, I enabled the“
   Save response headers” option.
 * I’ll keep monitoring my custom HTTP headers and update you accordingly.
 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [5 years ago](https://wordpress.org/support/topic/custom-http-headers-missing/#post-14535848)
 * OK. Keep me posted. Also, make sure there is no other page caching solution is
   being used besides this plugin.
 *  Thread Starter [Amar Ilindra](https://wordpress.org/support/users/amarilindra/)
 * (@amarilindra)
 * [5 years ago](https://wordpress.org/support/topic/custom-http-headers-missing/#post-14535864)
 * Hi [@isaumya](https://wordpress.org/support/users/isaumya/)
 * The website is on Closte ([https://closte.com/](https://closte.com/)) and they
   have a built-in object and OP cache.
 * Do I need to disable them as well.
 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [5 years ago](https://wordpress.org/support/topic/custom-http-headers-missing/#post-14535866)
 * No, Object Cache and OP Cache are fine. You can keep them.

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

The topic ‘Custom HTTP Headers Missing’ is closed to new replies.

 * ![](https://ps.w.org/wp-cloudflare-page-cache/assets/icon-256x256.gif?rev=3234997)
 * [Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals](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/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [headers](https://wordpress.org/support/topic-tag/headers/)

 * 6 replies
 * 2 participants
 * Last reply from: [iSaumya](https://wordpress.org/support/users/isaumya/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/custom-http-headers-missing/#post-14535866)
 * Status: resolved