Support » Fixing WordPress » Categories as sub-domains -> How to detect login in main domain?

  • Resolved Duke


    Im using the WP Subdomains plugin, so that I can turn any category into a subdomain ( ->
    But now when im in the category (subdomain) or in a post in that category, it wont detect anymore than Im logged in, in the main site.

    How can I make it detect that I am logged in the main site, when I am in a category?

    For example, i made a category “animals”, so now my category is accesible with
    But when Im inside, wordpress doesnt detect anymore that im logged in on … so i need to write again info for comments, and the Edit Post link doesnt show.

    I was looking at this post and this piece of code:

    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '/');

    but Im not quite sure if it’s what Im looking for.

    How can I fix this??

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thanks for linking my other post.
    As this concerns the plugin WP Subdomains, but could also be used in other contexts, I thought that asking a general question too could be useful for anyone having the need to make wordpress port the login to subdomains as well.




    Posting the solution to the issue, from the other thread.

    Add an option to your wp-config.php:

    define(‘COOKIE_DOMAIN’, ‘’);

    Where is your domain name. Remember to add the preceeding dot (.) as this is what makes it work.


    I wanted to thank you Dukessa for posting that. I was having problems with it as well. Greatly appreciate it!


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Categories as sub-domains -> How to detect login in main domain?’ is closed to new replies.