[Domain Mapping] Help with HTTP/HTTPS

Even if the protocol for a mapped domain is forced to http:// under Tools > Domain Mapping in a subsite, the mapped URL still loads over https.

I believe this is due to either one or both of the redirect rules I have in my .htaccess file. They are there because I need the main domain and original URLs of all sub-domain subsites to load over https (yes, I have a wildcard SSL cert), but all custom mapped domains must load over plain http as I do not have certs for them.

These are the redirect rules currently in my .htaccess (domain name replaced with generic name). Can someone please take a look and see how they can be modified to achieve the above?

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteEngine On

RewriteCond ^domain.com [NC]

RewriteRule ^(.*)$ https://domain.com/$1 [L,R=301]

  • Buddy
    • Flash Drive

    Thanks Ash, yes. What is happening is…

    From a users "Sites" page that shows all of their sites, there is the "Edit Site" button which should ALWAYS take them to https://[subdomain].agentassets.com/?et_fb=1 (using Divi theme, this will throw them into the Edit mode of their site.)

    However, the link even though it has the correct link, forwards to https://[mappeddomain].com even though the settings in the Domain Mapping for the site say "Disabled and entered domain should be used". So this means that it shouldn't FORCE it to anywhere, correct?

    My support agent also told me that since some version, I think he said 4.5?, didn't need a plugin in order to forward to the domain name. What he discovered was that it was going to whatever the "Home_url" is set to. So these are all set as such by default it seems when creating the site? I am using your plugins to create the site with a custom page as well. I am wondering how the home_url gets set when creating the site and how we can make this work. This used to work and maybe since that change, things are not getting set right.

    The "Edit Site" link will be correct if I change the home url to https://g36forsale.agentassets.com.

  • Nithin
    • Support Wizard

    Hi Buddy,

    I was able to login to your website dashboard initially, but got logged out when I tried to browse to other dashboard pages.

    Now, I could notice the following message, when I try to use Support access:

    So, I wasn't able able to give a closer look regrading how the dashboard is behaving at the moment. Yes, you could also opt for native method of mapping, which is editing the site url for each subsite as you have mentioned.

    If you looking to make it work via Domain Mapping, then would recommend you to disable any https rules added via the .htaccess file, and then enable the https options, under Settings > Domain Mapping page as follows:

    And please re-map the domain, and see whether it's loading in http or not. It should have worked out of the box in such case.

    If you still have same issue, then please grant support staff access so we can take a closer look. You can grant access from WPMU DEV > Support > Support Access > Grant Access, or check this manual: https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    Please let us know once you enable access, so that we could get this sorted. Have a nice weekend. :slight_smile:

    Kind Regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.