Why Your CookieYes Banner Keeps Reappearing (And How to Fix It)
Content
If you've ever set up the CookieYes banner only to find it pops up on every page load, you're not alone. This is a common issue that can frustrate users and undermine your site's GDPR/CCPA compliance. Based on community reports and solutions, here are the most common reasons for this behavior and how to resolve them.
The Problem: The Banner Won't Remember Consent
The core issue is that the user's cookie consent preference is not being stored properly. This causes the banner to treat every page view or revisit as a first-time visit, prompting the user to make a choice repeatedly.
Common Causes and Their Solutions
1. HTTP vs. HTTPS Protocol Mismatch
Why it happens: The 'cookieyes-consent' cookie uses the 'secure' attribute, meaning it can only be set and read over a secure HTTPS connection. If a user visits an HTTP page (even after accepting on HTTPS), the browser cannot read the existing consent cookie, so it shows the banner again.
The fix: Ensure your entire site uses HTTPS. The most effective solution is to set up a redirect from HTTP to HTTPS. Many hosting providers offer an easy "Force HTTPS" option in their control panel.
2. Incorrect WordPress Address Configuration
Why it happens: If your WordPress address (URL) is set to https://domain.com but a user visits https://www.domain.com (or vice versa), the browser may treat them as two separate sites due to the same-origin policy for cookies.
The fix: Ensure your WordPress Address (URL) and Site Address (URL) in Settings > General are identical to the URL visitors use to access your site. Consistency is key.
3. Subdomain or Multi-Site Configuration Issues
Why it happens: By default, a consent cookie set on www.example.com will not be shared with subdomain.example.com. This means a user would have to consent separately on each subdomain.
The fix: For multiple subdomains, you have two options:
- Use Consent Sharing: If using the CookieYes web app, enable the "Subdomain consent sharing" option in the dashboard under Advanced Settings > Consent settings. You would then only need the plugin active on your main site and should add its script manually to the <head> of your subdomain sites.
- Define Cookie Domain: For a standard WordPress multisite or WPML setup, you can try adding the following line to your
wp-config.phpfile to set the cookie domain for the entire site network:define('COOKIE_DOMAIN', '.yourmaindomain.com');(Note the leading dot).
4. Caching or Plugin Conflicts
Why it happens: Aggressive caching mechanisms can sometimes serve a cached version of the page that includes the banner, regardless of the user's consent status.
The fix: Clear all your caching layers—this includes your browser cache, any WordPress caching plugins (like WPRocket), and server-level cache (e.g., Varnish, NGINX). If the problem persists, try temporarily disabling your caching plugin to see if it is the source of the conflict.
Need More Help?
If none of these solutions work for your specific setup, the best course of action is to seek help from the wider community. Be prepared to share your site URL and a clear description of the steps you've already tried when asking for help.
Related Support Threads Support
-
Set up single banner for main domain and subdomainshttps://wordpress.org/support/topic/set-up-single-banner-for-main-domain-and-subdomains/
-
Banner status shows active on wordpress backend but it is nothttps://wordpress.org/support/topic/banner-status-shows-active-on-wordpress-backend-but-it-is-not/
-
Banner keeps appearing despite saving preferenceshttps://wordpress.org/support/topic/banner-keeps-appearing-despite-saving-preferences/
-
Site moved change domainhttps://wordpress.org/support/topic/site-moved-change-domain/
-
WPML cookie bannerhttps://wordpress.org/support/topic/wpml-cookie-banner/
-
Banner disappeared from live sitehttps://wordpress.org/support/topic/banner-disappeared-from-live-site/
-
CookieYes – admin panel is throwing errors and can make initial setuphttps://wordpress.org/support/topic/cookieyes-admin-panel-is-throwing-errors-and-can-make-initial-setup/
-
‘cookieyes_consent_update’ – Event not firehttps://wordpress.org/support/topic/cookieyes_consent_update-event-not-fire/
-
Banner pops up after “accept all”, but solved the problemhttps://wordpress.org/support/topic/banner-pops-up-after-accept-all/