DEV Community

Cover image for Managing Cookie Consent Across Multiple Domains: Architecture, Browser Storage, and CMP Setup
IntelligenceX
IntelligenceX

Posted on

Managing Cookie Consent Across Multiple Domains: Architecture, Browser Storage, and CMP Setup

Managing cookie consent on one website is relatively simple. Managing it across multiple domains introduces a different set of engineering problems.

Consider an organisation operating:

example.com
shop.example.com
support.example.com
example.co.uk
example.in
Enter fullscreen mode Exit fullscreen mode

The organisation may want one centralised consent management system. However, a shared CMP dashboard does not automatically mean that visitor consent can be transferred between every website.

This article covers the architecture, browser storage limitations, and implementation considerations for multi-domain cookie consent.

1. Understand the Two Different Requirements

First, separate two capabilities.

Multi-website CMP management

One account manages multiple websites, configurations, cookie inventories, and consent records.

Cross-domain consent sharing

A visitor's choice on one website is recognised by another participating website.

These are different technical requirements.

For example, a CMP might manage 50 websites centrally while still asking a visitor for consent separately on each root domain.

2. Understand Browser Domain Boundaries

Consider:

www.example.com
shop.example.com
support.example.com
Enter fullscreen mode Exit fullscreen mode

These subdomains share the same registrable domain.

A cookie configured with an appropriate parent-domain scope may be accessible to multiple subdomains.

However, this requires careful security configuration. Broad cookie scopes can expose data to more subdomains than intended.

Now consider:

example.com
example.co.uk
example-store.com
Enter fullscreen mode Exit fullscreen mode

These are separate root domains.

A browser cookie set for example.com cannot be read directly by example.co.uk.

A shared CMP script does not remove this browser security boundary.

3. Common Consent-Sharing Architectures

A. Shared cookie for subdomains

Suitable for certain subdomain architectures.

example.com
    |
    +-- shop.example.com
    |
    +-- support.example.com
    |
    +-- blog.example.com
Enter fullscreen mode Exit fullscreen mode

A carefully configured parent-domain cookie can allow participating subdomains to access a shared consent state.

Consider:

  • Secure cookie settings
  • Appropriate SameSite behaviour
  • Minimal cookie scope
  • Expiry and renewal
  • Consent configuration versioning

Do not use a broad cookie scope without reviewing the security implications.

B. CMP-supported cross-domain sharing

Some CMP vendors provide dedicated consent-sharing features.

For example, Usercentrics documents a Cross-Domain Consent Sharing implementation that uses an iframe and local storage to transfer consent between participating websites.

Its documentation also describes browser restrictions that can affect the feature, including Safari, Firefox settings, iOS browsers, and different root domains in Chrome.

Read its Cross-Domain Consent Sharing technical documentation.

Do not assume all CMP implementations work the same way.

C. Server-side synchronisation for authenticated users

When users sign in across multiple websites, a server-side architecture may help maintain account-level privacy preferences.

A simplified model:

Website A ----\
               \
                > Identity / Preference Service
               /
Website B ----/
Enter fullscreen mode Exit fullscreen mode

The system can associate consent records with an authenticated account, subject to appropriate legal, privacy, and security design.

Important considerations include:

  • Clear disclosure of the scope of preferences
  • Purpose-specific choices
  • Authentication and authorisation
  • Preference updates
  • Withdrawal propagation
  • Record retention
  • Audit history

A login account does not automatically make every consent purpose interchangeable.

D. Separate consent per root domain

For unrelated domains, separate consent collection may be the simplest and most reliable option.

Each website maintains its own consent state and relevant configuration.

4. Example Consent Data Model

A consent event should identify the website and configuration associated with the visitor's decision.

Example:

{
  "consent_id": "cns_2027_102",
  "site_id": "ecommerce_website",
  "domain": "shop.example.com",
  "visitor_id": "visitor_pseudonymous_001",
  "timestamp": "2027-03-10T10:20:00Z",
  "categories": {
    "necessary": true,
    "analytics": false,
    "advertising": false
  },
  "banner_version": "v2.1",
  "policy_version": "2027-03",
  "configuration_id": "cfg_shop_102"
}
Enter fullscreen mode Exit fullscreen mode

This is an illustrative schema, not a prescribed GDPR format.

The site_id and configuration fields are important because consent records from different websites should not be confused.

5. Build a Website-Specific Tracker Inventory

Never assume that all websites use identical tracking technologies.

For example:

Website Potential integrations
Corporate Analytics, forms, embedded media
Ecommerce Ads, analytics, payment integrations
Support Chat, ticketing, session analytics
Blog Video embeds, social widgets

Run scans independently and review dynamic pages.

An automated scanner may not detect every tracker on authenticated pages, checkout flows, or scripts that load only after particular interactions.

6. Implement Consent Enforcement

A consent database is not an enforcement mechanism by itself.

The application should ensure that configured non-essential technologies do not run before the required consent.

Test:

  • First visit
  • Accept all
  • Reject non-essential
  • Custom category selection
  • Returning visitor
  • Preference update
  • Withdrawal
  • Cross-domain navigation
  • Browser storage restrictions

Google Consent Mode can communicate consent states to supported Google tags, but it does not automatically block every third-party script.

See Google Consent Mode.

7. Multi-Domain Testing Matrix

Test What to verify
Same subdomain family Consent state is applied as intended
Different root domain Separate or supported sharing behaviour
Safari Storage restrictions do not break the experience
Firefox Privacy settings and storage clearing
Chrome Cross-site storage limitations
Mobile browser Behaviour matches supported implementation
Consent withdrawal Relevant preferences update
New configuration Correct version is applied

Test the actual browser behaviour rather than relying only on CMP dashboard status.

8. Can a CMP Simplify Multi-Website Management?

A CMP can centralise:

  • Website configurations
  • Consent banners
  • Regional privacy rules
  • Cookie inventories
  • Consent records
  • Script-blocking rules
  • Team access and reporting

ConsentX publishes plans for multi-website management:

Plan Website allowance
Free 1
Pro Up to 10
Business Up to 50
Enterprise Unlimited

The Pro plan includes consent receipts, tamper-evident evidence, regional rules, and prior-script blocking. Business adds multi-tenant management and role-based access control.

See ConsentX pricing.

Important: website allowances refer to centralised management capacity. They should not be interpreted as automatic cross-domain consent synchronisation.

Conclusion

Multi-domain consent management requires a clear separation between central administration and visitor-level consent sharing.

Developers should understand browser domain boundaries, choose an appropriate sharing architecture, preserve website-specific consent records, and test enforcement across browsers.

A central CMP can simplify operations, but the technical implementation must still respect domain isolation, privacy requirements, and visitor preferences.

Top comments (0)