Contents
There’s no such thing as cross domain cookies. You could share a cookie between foo.example.com and bar.example.com but never between example.com and example2.com and that’s for security reasons. You cannot share cookies across domains. You can however allow all subdomains to have access.
At the top right, tap More More and then Settings. Tap Site settings and then Cookies. Next to “Cookies,” switch the setting on. To allow third-party cookies, check the box next to “Allow third-party cookies.”
If you omit the constant or set it to an empty value, cookies will belong to the domain their requested from. Thats the configuration you want to use for multisite/network environments especially when it comes to different domains.
When to use cookie domain in WordPress settings?
As cdn.mydomain.com is not part of your WordPress network, it wont be affected by your settings. The COOKIE_DOMAIN constant should only be used if you want to serve cookies from a single domain for all your sites in the network. If you omit the constant or set it to an empty value, cookies will belong to the domain their requested from.
What does it mean when Cookie is not set in requests?
That means if no value is provided they probably shouldn’t send = but that probably parses fine… except that they send an empty Domain. If they don’t specify their own domain attribute, I believe that we force it to be the host of the URL that was requested when we made the request. However, they specify it as empty.
However, modern browsers respect the newer specification RFC 6265, and will ignore any leading dot, meaning you can use the cookie on subdomains as well as the top-level domain. In summary, if you set a cookie like the second example above from example.com, it would be accessible by foo.example.com, and vice versa.