Cookie Banner Not Showing: How to Find Out Why and Fix It
A cookie banner that does not appear is one of the most common consent problems, and it is easy to misread. Most of the time the banner is working but hidden from you: your own earlier choice is stored, the tool only shows it in certain regions, your domain is not on its allowed list, or a cache, optimisation plugin, ad blocker or security policy stops the script loading. Occasionally it is truly broken. Either way it matters, because under UK and EU rules non-essential cookies need consent before they are set, and a missing banner usually means tracking runs without it or not at all. This guide shows you how to test properly, find the real cause and fix it in Complianz, Cookiebot, OneTrust, Shopify and HubSpot.
Why the banner seems to be missing
A consent tool has three jobs: load a script, decide whether this visitor needs to be asked, and draw the banner if they do. A banner can fail to appear at any of those stages, and only the first is a fault in the usual sense. The second stage is designed to hide the banner, for example when the visitor has already chosen or is outside the regions you configured.
That is why the first thing to establish is whether the banner is missing for everyone or only for you. Owners and developers are the people most likely to have accepted or rejected cookies already, to use a VPN, to run an ad blocker and to be logged in to the site, all of which can hide a banner that ordinary visitors see.
| Stage | What goes wrong | Typical sign |
|---|---|---|
| Script loading | Blocked by a cache, optimiser, ad blocker or Content Security Policy | Errors or blocked requests in the console; tool object undefined |
| Deciding to show | Consent already stored, region rules, domain not listed, unpublished settings | Script loads without errors but no banner appears |
| Drawing the banner | Theme CSS hides it, another banner covers it, mobile layout breaks it | Banner element exists in the DOM but cannot be seen |
If you are unsure what the banner must do legally, the cookie consent guide covers the requirements, and the GDPR guide explains the wider rules.
The common causes
| Cause | Tools most affected | How to confirm |
|---|---|---|
| Your choice is already stored | All | Banner appears in a private window or after clearing site data |
| Region or geolocation rules | Shopify, OneTrust, Cookiebot, HubSpot, Complianz | Banner appears when you test from a UK or EU connection |
| Domain not on the allowed list | Cookiebot, OneTrust, HubSpot | Works on one address, such as www, but not another |
| Changes saved but not published | OneTrust, Cookiebot | Dashboard shows the banner but the live script is older |
| Setup not finished | Complianz | Wizard or banner settings show incomplete steps |
| Script deferred, combined or cached | WordPress sites with caching plugins, Cloudflare | Banner appears when optimisation is switched off |
| Ad blocker or privacy extension | All | Banner appears with extensions disabled |
| Content Security Policy blocks the script | Any tool loaded from its own domain | Console shows a refused to load message naming the policy |
| Two consent tools at once | Plugin plus platform banner | One banner flashes and disappears, or the wrong one appears |
Work down this table in order. The first three causes account for most reports and take only a few minutes to rule out, while the later ones need DevTools.
How to test properly
Start from a clean state. Open a private window with no extensions, or clear the site's stored data: in Chrome DevTools open the Application panel, choose Storage and click Clear site data. Reload the page. Then test once more from a phone on mobile data with no VPN, which shows you roughly what a typical visitor in your country sees.
Look for the stored choice
Each tool remembers the decision in a cookie or in local storage. If one of these exists, the banner will stay hidden:
| Tool | Where the choice is stored |
|---|---|
| Cookiebot | CookieConsent cookie |
| OneTrust | OptanonConsent and OptanonAlertBoxClosed cookies |
| Complianz | Cookies beginning cmplz_ |
| Shopify | _tracking_consent cookie |
| HubSpot | __hs_cookie_cat_pref and related __hs_ cookies |
Check the script loaded
Open the Console and type the object name for your tool. If it returns undefined, the script never ran and you have a loading problem rather than a display problem:
typeof Cookiebot // Cookiebot
typeof OneTrust // OneTrust
typeof Shopify !== 'undefined' && Shopify.customerPrivacy // Shopify
document.querySelectorAll('[id*="cmplz"], [class*="cmplz"]').length // Complianz
Then open the Network panel, filter by the tool's domain, such as cookiebot or cookielaw, and reload. A request that is missing, cancelled or shown as blocked tells you where to look next. Red messages in the console that mention a Content Security Policy point straight at your headers.
display: none, zero opacity or a low z-index coming from your theme rather than the consent tool.Tool by tool
Complianz
Finish the setup wizard, then check the consent regions you selected. If you chose only the EU, visitors from the UK or elsewhere may not see a banner, depending on your settings. Complianz also lets you preview the banner from its settings screen, which helps separate a display problem from a loading one. Clear every cache after changing settings, because cached pages can carry old banner code.
Cookiebot
The banner only works on domains listed in the domain group for your Cookiebot ID. Add the bare domain, www, and any staging or alias addresses. Check the script tag is the first script in the <head>, especially in automatic blocking mode:
<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js"
data-cbid="00000000-0000-0000-0000-000000000000"
data-blockingmode="auto" type="text/javascript"></script>
OneTrust
Changes to a banner or geolocation rule only reach the site after you publish the script for that domain. Check that the live site uses the production script ID and not the test version, which ends in -test. Geolocation rules decide which template, if any, each region gets, so a region set to no banner shows nothing.
Shopify
Open Settings, then Customer privacy, then the cookie banner settings, and check which regions the banner is shown in. If you also installed a consent app, decide which one you will use and switch the other off. The banner relies on the scripts Shopify adds to every theme, so a heavily edited theme.liquid that removed {{ content_for_header }} will break it along with much else.
HubSpot
Cookie banners are set per domain under the privacy and consent settings, and each banner can be limited to visitors from chosen countries. The banner loads through the HubSpot tracking code, so it will not appear on a page where that code is missing, such as a site template that was rebuilt without it.
Caching, optimisation and security policies
Performance tools are the most common reason a working banner breaks after a change. Features that delay JavaScript until the visitor interacts, combine scripts into one file or move them to the end of the page can stop a consent script running on time, or at all. In WordPress this includes the JavaScript delay and combine options in WP Rocket, LiteSpeed Cache, Autoptimize and similar plugins. On Cloudflare, Rocket Loader can do the same.
- Exclude the consent tool's script, by its file name or domain, from combining, minifying, deferring and delaying.
- On Cloudflare, either turn off Rocket Loader or add
data-cfasync="false"to the consent script tag so Rocket Loader leaves it alone. - Clear the plugin cache, any server cache and the CDN cache, then test again in a private window.
The WordPress JavaScript guide explains how deferral and delay settings work if you need to tune them without losing speed.
Content Security Policy
If your site sends a Content-Security-Policy header, it must allow the consent tool's domains. A policy that does not will block the script silently from the visitor's point of view. For example:
Content-Security-Policy: script-src 'self' https://consent.cookiebot.com https://consentcdn.cookiebot.com;
connect-src 'self' https://consentcdn.cookiebot.com
OneTrust needs https://cdn.cookielaw.org, and https://geolocation.onetrust.com if you use geolocation rules. Check your tool's documentation for its full list. The WordPress security headers guide shows where the policy is usually set.
A worked example
A Shopify store owner in Manchester reports that the cookie banner has disappeared. In a private window the banner still does not show, so a stored choice is not the cause.
- In Shopify, the customer privacy settings show the banner limited to visitors in the EU and UK, which is correct for the shop.
- The owner remembers their laptop is always connected to a VPN, and checks the exit location, which is in the United States.
- Testing from a phone on mobile data with the VPN off, from a UK connection, shows the banner straight away.
- While checking, they find a consent app installed months earlier that also tried to show a banner. They remove it so only one tool controls consent.
Nothing was broken. The test was simply made from a region where the banner was not meant to appear, and the second app was a problem waiting to happen.
The fix, step by step
Step 1
Test in a clean private window
Open a private window with all extensions disabled, or clear the site's data from the Application panel in Chrome DevTools, then load the page logged out. If the banner appears, the cause was your own stored choice and nothing needs fixing. If it still does not appear, note whether the page loads normally and move on. Repeat the test once on a phone using mobile data, because that removes your VPN, browser extensions and saved cookies in one go.
Step 2
Check region and geolocation settings
Open your consent tool's settings and find where it decides which visitors see a banner. In Shopify that is the customer privacy settings, in OneTrust the geolocation rules, and in Cookiebot, HubSpot and Complianz the region or country options. Confirm the regions where your visitors are, such as the UK and EU, are included. Then check where you are testing from, including any VPN exit location. Test again from a connection inside an included region to confirm.
Step 3
Confirm the domain is listed
Find the list of domains your tool allows. In Cookiebot that is the domain group for your ID, in OneTrust the domain the script was published for, and in HubSpot the domain chosen for each banner. Add the bare domain, the www version and any staging or alias addresses visitors use. Save, publish if required, and load each address in a private window. The banner should now appear on every address, not just the one originally set up.
Step 4
Publish and finish the setup
Check that the latest banner settings are actually live. In OneTrust, publish the script for the domain and make sure the site uses the production script, not the one ending in -test. In Cookiebot, confirm the banner and its settings are saved for the right ID. In Complianz, finish any incomplete wizard steps and review the banner settings. Clear the site cache afterwards, then reload in a private window to confirm the current version is served.
Step 5
Check the script loads in DevTools
Open the Console and check that your tool's object exists, for example typeof Cookiebot or typeof OneTrust, and look for red errors. In the Network panel, filter by the tool's domain and reload to confirm its script downloads with a 200 status. A missing request suggests the tag is not in the page, a blocked one points to an extension or policy, and a script that loads without a banner points back to settings or display.
Step 6
Exclude the script from optimisation
In your caching or performance plugin, add the consent script's file name or domain to the exclusions for combining, minifying, deferring and delaying JavaScript. On Cloudflare, turn off Rocket Loader or add data-cfasync="false" to the consent script tag. Make sure the script sits near the top of the head, before analytics and advertising tags. Clear the plugin, server and CDN caches, then test in a private window. The banner should appear as soon as the page loads.
Step 7
Allow the tool in your security policy
If the console shows a message that a script was refused because of a Content Security Policy, add the consent tool's domains to the script-src directive, and to connect-src or other directives if the tool's documentation lists them. For Cookiebot that includes consent.cookiebot.com and consentcdn.cookiebot.com, and for OneTrust cdn.cookielaw.org. Update the header where it is set, reload the page, and confirm the console no longer reports any policy violations.
Step 8
Remove duplicate tools and recheck mobile
Check whether more than one consent tool is installed, such as a WordPress plugin alongside a tag manager template, or a Shopify app alongside Shopify's own banner. Keep one and remove the rest. Then test on a real phone, logged out, to make sure the banner is not hidden behind a chat widget or menu. Finally, confirm in DevTools that analytics and advertising cookies are not set until you accept, and record the settings you changed.
Edge cases worth knowing
- Logged-in users. Some setups skip the banner for administrators or logged-in customers. Always test logged out.
- Banner shows on desktop only. A mobile menu, chat widget or sticky footer can cover the banner, or theme CSS can hide it at small widths. Test on a real phone, not only a resized desktop window.
- Banner flashes then disappears. Usually two tools, or a script that reads an old stored choice after the banner has drawn. Remove the duplicate tool and clear stored data.
- Single-page applications. If the site swaps pages without a full reload, check the consent script is included once in the outer layout, not inside a component that is replaced.
- Tags firing while the banner is missing. Check that analytics and advertising tags wait for consent. The ePrivacy tracking guide shows how to confirm nothing is set before the visitor chooses.
Keeping the banner working
Banners tend to break when something around them changes: a new caching plugin, a theme update, a new domain or a new security header. A few habits catch problems early:
- After any change to caching, optimisation, themes, domains or headers, test the banner in a private window and on a phone.
- Keep one consent tool, and document which one it is, so nobody installs a second.
- Add new domains, including staging and campaign sites, to the tool's allowed list before launch.
- Check your Reject option is as easy to use as Accept, and that your privacy policy describes the cookies the banner lists.
The full list of GDPR fixes covers the related consent and policy problems audits find.
1. Why is my cookie banner not showing?
The most common reason is that you have already accepted or rejected cookies, so the tool remembers your choice and hides the banner. Other frequent causes are region settings that only show the banner in certain countries, a domain that is not on the tool's allowed list, unpublished changes, a caching or optimisation plugin that delays the script, and ad blockers. Test in a private window with extensions disabled first, because that rules out the stored choice and blockers in one step.
2. Why does my cookie banner show for others but not for me?
Your own browser is the one most likely to be hiding it. You may have made a choice earlier, be logged in as an administrator, be using an ad blocker or privacy extension, or be connected through a VPN in a region where the banner is switched off. Clear the site's data or use a private window with no extensions, and test from a phone on mobile data. If the banner appears there, the setup is working for normal visitors.
3. Can a caching plugin stop my cookie banner from appearing?
Yes. Caching and performance plugins that combine, defer or delay JavaScript can stop a consent script running when it should, and cached pages can carry outdated banner code. Exclude the consent tool's script from those features, clear the plugin, server and CDN caches, and test again in a private window. On Cloudflare, Rocket Loader can cause the same problem, which you can avoid by turning it off or marking the consent script so Rocket Loader skips it.
4. Do ad blockers hide cookie banners?
Many do. Popular ad blockers and privacy extensions include filter lists that hide or block consent banners deliberately, because their users find them annoying. You cannot override that, and you do not need to, since those visitors have chosen to block the tool. What matters is that the banner appears for visitors without blockers and that tracking does not run without consent. Always disable your own extensions before deciding the banner is broken.
5. Is it illegal if my cookie banner is not showing?
It can be, if non-essential cookies are still being set. Under the UK PECR rules and the EU ePrivacy rules, analytics, advertising and similar cookies need the visitor's consent before they are stored, and strictly necessary cookies are the main exception. If the banner is missing but those tags are blocked until consent, you are not setting them unlawfully, although you are losing data. Fix the banner promptly and check that no tracking cookies are set before a choice.
6. Why does my cookie banner show on desktop but not on mobile?
Usually something on the mobile layout covers it or hides it. A sticky header, chat widget, app install prompt or mobile menu can sit on top of the banner, or theme styles can hide it at small screen widths. Region settings can also differ if your phone uses mobile data with a different location from your office connection. Test on a real phone, logged out, and inspect the banner element with remote debugging to see which styles are applied.
7. Can I run two cookie consent tools at the same time?
You should not. Two tools compete to show banners and to record consent, so one may hide the other, a banner may flash and disappear, and tags may read the wrong consent state. That can lead to tracking without valid consent or to visitors being asked twice. Choose a single tool, whether a plugin, a platform banner or a consent management service, remove the others completely, and clear caches so the old code is no longer served.
Our GDPR audit checks your page for a cookie consent banner and for cookies set before consent, so you can confirm the fix works for real visitors.
Open GDPR Fixes โ