• I have set up a multisite installation. Because I can’t, as yet, afford a wildcard SSL certificate so I can use subdomains, I’m trying to set up any cookie consent plugin that can be used by all sites created on the domain. However, because all sites are created under the main domain, i.e. ‘mydomain.com/site’, once cookie consent has been given on one site, the consent banner does not show up on another. Is there a way around this?

    • This topic was modified 4 years, 9 months ago by Yui. Reason: moved to fixing wordpress
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The problem is a cookie saved for the main site is by domain only (no path), so sub-sites using the same domain inherit the same cookie. Sub-site cookies ought to be unique to the sub-site since they each use a different path. It’s only cookies saved under the main site that is the problem.

    The only solution I can see is to not use the main site. All sites are sub-sites, so all cookies include a path. You could add some rewrite rule to direct plain domain requests to one of the sub-sites.

Viewing 1 replies (of 1 total)

The topic ‘Problem with cookie plugins for multisite, not using subdomains.’ is closed to new replies.