Paste this notice into Google and you’ll mostly get hand-wavy answers about “cookies and caching.” Here’s the real story for WP Rocket: something on your site is sending a Set-Cookie header on this page, so your caching layer refuses to store it. The fix is to find who’s setting that cookie, decide whether the page really needs to be dynamic, and then either turn the cookie off, move it to AJAX, or let WP Rocket handle it in a cache-friendly way.
WP Rocket (or my edge cache) shows “Page caching is disabled because your site uses the ‘Set-Cookie’ header.” What does this actually mean, and how do I fix it without breaking logins or carts?
If you’re wondering what’s broken: your page isn’t being cached at all. Something is sending a Set-Cookie header with the response, so your cache (and WP Rocket) treat it as dynamic and skip page caching.
The Set-Cookie header tells the browser “store this cookie.” That’s great for logins, carts, and personalization—but shared caches (NGINX, Varnish, CDNs, edge caches) see it and assume the page is user-specific.
Most caching layers play it safe: if a response includes Set-Cookie, they don’t cache the page at all. WP Rocket or your host then surfaces a notice like “Page caching is disabled because your site uses the ‘Set-Cookie’ header.”
Your job is to answer two questions:
Set-Cookie being sent?First, make sure you’re testing as a normal visitor.
set-cookie:.If you see one or more set-cookie lines on a public page while logged out, that’s what’s disabling page caching.
If you like the command line, you can verify the same thing with curl:
curl -I https://example.com/ | grep -i set-cookie
No output = no Set-Cookie header. One or more lines = something on the server is setting cookies for that page.
Don’t panic if you see Set-Cookie on:
Those pages are supposed to be dynamic and are often excluded from caching on purpose. The problem is when your public pages (home, posts, landing pages) send Set-Cookie for anonymous visitors.
Once you’ve confirmed Set-Cookie is present, you need to find what sets it.
In DevTools, under the same response, check the Cookies / Application → Cookies panel. You’ll usually see names like:
PHPSESSID (generic PHP sessions)wp_woocommerce_session_... or woocommerce_items_in_cart_ga, _fbp, marketing tags (usually set by JS, not headers)Those names are your biggest clue. Search your plugins list for anything that matches the purpose (e.g. “recently viewed products”, “currency switcher”, “popup”, “newsletter bar”).
set-cookie disappears from the response headers.When the header disappears, you’ve found the plugin or combination of plugins that’s setting it.
This is very common with:
session_start() for no good reasonIf the plugin must set a cookie for every visitor and cannot be changed, you have two choices:
Typical examples:
This way, your public content (blog posts, landing pages, category pages) can still be cached, while high-risk dynamic pages stay uncached on purpose.
Some plugins store user-specific info (like country or currency) in a cookie but you still want cached pages for each variant. WP Rocket can handle this in some cases.
On some stacks (NGINX FastCGI, Varnish, custom edge cache), your host can choose to ignore Set-Cookie for specific pages or cookies so the page can still be cached.
For example, NGINX can be configured to ignore certain headers when caching. But this is dangerous if the cookies include login or session data—you could end up caching personalized content for everyone.
If you’re not 100% sure which cookies are being set and why, don’t try to hack around them at the server level. Ask your host’s support to review the headers and suggest a safe configuration.
Once you’ve made changes, verify that things are actually fixed:
Set-Cookie header (or only send it after an action like adding to cart).Scroll down and hit Continue Chat. Tell me which cookie names you’re seeing in the headers, which plugins you suspect, and whether the problem is on all pages or just a few. I’ll help you narrow it down.
Scroll down to the contact form below. Enter your name, email, and WordPress needs. Atiba will get back to you as soon as possible.
WP Assistant is a free tool created by Atiba Software, a WordPress design and development company located in Nashville, TN. If you need more personalized WordPress assistance let us know, and we’ll get back to you ASAP!