Support » Plugin: WordPress MU Domain Mapping » Frontend login fails with Domain Mapping enabled

  • Resolved trejder


    In brief: Domain Mapping breaks login, if blog is set to force user login before seeing blog contents.

    Domain Mapping on subdomain-type WordPress network always redirects form subdomain to mapped domain. For example, if I have site, mapped to domain, whenever I enter URL, I’m redirected to domain, if Domain Mapping plugin is enabled.

    If user has enabled (any plugin or own code) that user must be logged in in order to view frontend (blog contents) then login fails and user is all the time redirected back to login form, if Domain Plugin is activated.

    This is problably because WordPress writes login cookie for and this cookie is not available for domain after redirection done by Domain Mapping.

    I don’t know, if there is any fix for this problem, but maybe you try to read login cookie (if exists and if this is possible) from original subdomain before redirection and set the very same cookie for the domain you’re about to redirect.

    Look into this question or this thread for more details.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Ron Rennick


    The security features in all web browsers prohibit a server on one domain from accessing the cookie from any other domain.

    Change your settings so the user logs into the mapped domain for the admin area as well as the front end.

    I’m quite new to WordPress, so I don’t know about what setting you’re talking about and where to change it? Can you guide me?

    Right now no matter if I use (subdomain URL) or (mapped domain) I’m always redirected (for login) to, and after logging-in, your plugin is redirecting me to, which is why login fails.

    I know very well about security issue you’re talking about. I just suggested, that if your plugin is doing redirection –>, then it should be able to read WordPress login cookie from before redirection, send it to as POST or sth and then, the same plugin under could check, if there is any data sent via POST, if so, then dump it to a login cookie for But that’s just my theoretical attempt to solve this problem.

    Ah, I think I found it. Thanks! :]

    I am experiencing similar difficulties. Please delineate the “settings” changes that are necessary to resolve the above-described problem.
    Thank you very much.

    @boise777: First go to your Network Dashboard > Settings > Domain Mapping Configuration and make sure that you:

    a) set your server’s correct IP address,

    b) checked first four (out of five) checkboxes bellow (at least this is, what I have checked).

    Then go to dashboard of each site of your network, to Tools > Domain Mapping and change Primary Domain from subdomain to your top-level domain.

    If I’m not mistaken, if you add new site to your network, by default its domain will be set to and you have to manually switch it to your top-level domain.

    Hello trejder,
    After making the above settings, all is working very well. Thank you!

    Glad, I could help! :] All the best…

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Frontend login fails with Domain Mapping enabled’ is closed to new replies.