javascript – Enable WordPress website to share cookie with non-WordPress subdomain website


If I set the WordPress cookie domain for the domain and all subdomains with:
define( ‘COOKIE_DOMAIN’, ‘’ ); in wp-config, the cookie is shared with subdomains that are hosted in the WordPress website.

How do I share the cookie with a subdomain that is a javascript website, not a WordPress website?

in progress 0
clevernickname 1 year 2021-07-28T09:18:30-05:00 0 Answer 0 views 0

Answer ( 1 )


    define( 'COOKIE_DOMAIN', '' ); will share the cookie with all * websites, whether they’re running WordPress or not. Or maybe restricted to https:// sites only, but apart from that any website will see the cookie. It’s your browser that’s sending the cookie and it doesn’t know what the website is running.

Leave an answer