Title: Secure cookie setting not working?
Last modified: June 19, 2018

---

# Secure cookie setting not working?

 *  Resolved [Ate Up With Motor](https://wordpress.org/support/users/ate-up-with-motor/)
 * (@ate-up-with-motor)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/secure-cookie-setting-not-working/)
 * I’ve been trying to use the plugin to improve the security of my site — I’m new
   to SSL/TLS connections and a lot of the fine points are mystifying to me.
 * I went into the HTTP Headers security settings, turned on Cookie security, and
   checked both Secure and HttpOnly. However, when I check the site with Mozilla
   Observatory, it says that the Secure header is not being set for cookies. Isn’t
   the plugin setting supposed to force Secure for all cookies? Am I misunderstanding,
   or have I done something wrong?
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsecure-cookie-setting-not-working%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Dimitar Ivanov](https://wordpress.org/support/users/zinoui/)
 * (@zinoui)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/secure-cookie-setting-not-working/#post-10415608)
 * Hi [@ate-up-with-motor](https://wordpress.org/support/users/ate-up-with-motor/),
 * This plugin will set the **httpOnly** flag and the **Secure** flag to all the
   cookies send by your server (WordPress, other PHP scripts, etc.)
    For example:
 *     ```
       <?php
       setcookie('some name', 'some value', 0, '/');
       ?>
       ```
   
 * I found that cookies from your site who are not HttpOnly and not Secure are all
   set by the browser, through-out some javascript libraries:
 * [https://ateupwithmotor.com/contentfiles/plugins/ga-germanized/assets/js/cookieconsent.js?ver=3.0.3](https://ateupwithmotor.com/contentfiles/plugins/ga-germanized/assets/js/cookieconsent.js?ver=3.0.3)
   `
   cookieconsent_status`
 * [https://ateupwithmotor.com/contentfiles/plugins/gdpr/assets/js/gdpr-public.js?ver=2.1.0](https://ateupwithmotor.com/contentfiles/plugins/gdpr/assets/js/gdpr-public.js?ver=2.1.0)
 *     ```
       gdpr[consent_types]
       gdpr[allowed_cookies]
       gdpr[privacy_bar]
       ```
   
 *  Thread Starter [Ate Up With Motor](https://wordpress.org/support/users/ate-up-with-motor/)
 * (@ate-up-with-motor)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/secure-cookie-setting-not-working/#post-10415627)
 * Hmm. Is it possible to have the JavaScript set cookies to use those settings?
 *  Plugin Author [Dimitar Ivanov](https://wordpress.org/support/users/zinoui/)
 * (@zinoui)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/secure-cookie-setting-not-working/#post-10415707)
 * I don’t think so.
    Guess you need to modify the source code of those libraries.
 *  Thread Starter [Ate Up With Motor](https://wordpress.org/support/users/ate-up-with-motor/)
 * (@ate-up-with-motor)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/secure-cookie-setting-not-working/#post-10415733)
 * Ahh, okay. This seems like something I should take up with the developers of 
   the plugins setting those scripts. Thanks for helping me understand the issue!
 *  Plugin Author [Dimitar Ivanov](https://wordpress.org/support/users/zinoui/)
 * (@zinoui)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/secure-cookie-setting-not-working/#post-10415747)
 * You welcome.

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

The topic ‘Secure cookie setting not working?’ is closed to new replies.

 * ![](https://ps.w.org/http-headers/assets/icon-128x128.png?rev=1413576)
 * [HTTP Headers](https://wordpress.org/plugins/http-headers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/http-headers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/http-headers/)
 * [Active Topics](https://wordpress.org/support/plugin/http-headers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/http-headers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/http-headers/reviews/)

## Tags

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

 * 5 replies
 * 2 participants
 * Last reply from: [Dimitar Ivanov](https://wordpress.org/support/users/zinoui/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/secure-cookie-setting-not-working/#post-10415747)
 * Status: resolved