Secure admin (https) causing issues with images when using domain mapping (6 posts)

  1. Zahak
    Posted 2 years ago #


    Have been using WordPress multisite for quite some time, and eventually thought that it would be a good idea to improve security with using https for admin part.

    It worked really good for main site, and subdomains for that site. However on other domains (using domain mapping plugin) it saved images in posts and pages with https instead of http, which unfortunately leads to a lot of broken images for normal users, which dont use https.

    To be honest I'm not sure if this was an issue previous to 3.9.1. We activated https quite recently, and I never thought of testing all sites, but just a handful...

    I haven't really digged that deep to find issue itself, and I don't know when I get the time. So, is this something that anyone else recognize?

  2. How did you activate https in WordPress for the admin?

  3. Zahak
    Posted 2 years ago #

    Adding force ssl admin to wp-config:
    define('FORCE_SSL_ADMIN', true);

    Then I didnt have rewrite rules at the beginning, but tried that too, according to wordpress "Administration over ssl": http://codex.wordpress.org/Administration_Over_SSL

    May have forgotten something here, but I think that was it.

  4. Okay, try this in your wp-config:

    if ( $_SERVER["HTTP_HOST"] == "DOMAIN.COM" ) {
        define('FORCE_SSL_ADMIN', true);
        define('FORCE_SSL_LOGIN', true);

    Where domain.com is the domain you want to use for HTTPS.

    I mention it here - http://halfelf.org/2014/ssl-for-one-domain-on-multisite/ - But I too had issues with that being weird.

  5. Zahak
    Posted 2 years ago #

    Sorry, really got too much on my hands.

    What I want to achive is that all domains on our multisite should use SSL when logging in. So the issue was that when logged in with other domain than actual main site (first blog/site) pictures etc get https in their url's. Thus they don't work for normal visitors, which only use http.

  6. HuddersfieldH
    Posted 2 years ago #

    I've had the same problem.

    I unticked remote login on the domain mapping page and that sorted it for me. (As long as your using the main domain mapping plugin.)

Topic Closed

This topic has been closed to new replies.

About this Topic