Can't get domain mapping to work with https:// and www.

I'm in the process of moving a number of standalone WP installs into a single multisite and as part of that I'm using the Domain Mapping plugin. I originally setup the primary blog as and as I'm moving the live domains over, I create a url on the multisite (something like and the later I change the url in the site settings. Then I also map the www version of the site if the original url didn't have the subdomain.

The problem is for some sites that already exist, their SEO is stronger with vs so I try to set the mapping to use the www. It works fine if I don't have https:// as the domain but as soon as I try to use https:// the site continues to redirect to even when the primary domain is

I'm using a VPS with an account in cPanel for the multisite; it has a dedicated IP and I create addon domains for each new installation. I use cPanel's included autoSSL which generates an ssl for each addon domain as well as the mail and www subdomains.

  • Rupok

    Hi Jake Zangrilli,

    So sorry to hear the inconvenience you are having. This is really weird and should not happen. I could tell you better about the issue if I could see it live, check your current configuration and make some tests on your site. Would you mind allowing Support Access so we can have a closer look at this?

    To enable support access you can follow this guide here:

    As far as I can remember, this issue was resolved before. Can you please confirm you are using the latest version of Domain Mapping plugin on your site and still getting the same issue?

    After checking on your site, if we can't make it work there and can also regenerate this on our test site, I'll report this to our developer right away. I believe, in that case, he will come up with a fix very soon.

    I'm looking forward to hearing from you and resolving this issue as soon as possible.

    Have a nice day. Cheers!

  • Rupok

    Hi Jake,

    Thanks for granting Support Access. I tried to check the mapping settings on your "m******" site. What I found at first is, you have changed the Site Address for your Subsite. Can you at first change the Site URL from "https://m********" to "https://www.m********" and check if that helps? If it doesn't, can you revert it back to the original subsite URL and check if the issue is gone for you? Please check the attached screenshot for reference.

    I also tried to access the Dashboard for that subsite to check the mapping setup on that subsite, but it's asking me to log in again even though I'm logged in as Super Admin with Support Access. In this case, can you send me a message with WP access credentials of that subsite through our secure contact form here:

    Subject: "Attn: Rupok"
    - That Subsite admin Username
    - That Subsite admin Password
    - Login URL
    - Link back to this thread for reference
    - Any other relevant URLs

    The subject line ensure that it gets assigned to me.

    I'm looking forward to hearing from you and resolving this issue as soon as possible.

    Have a nice day. Cheers!


    Jake Zangrilli if you're on apache and have access to your root directory .htaccess file then you might try playing with the following (above WordPress block):

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    ##### BEGIN Front-end Redirect Controls - doing this is cumbersome for many mapped domains, not meant to scale for production
    ###### BEGIN example section - copy and paste at bottom of Front-end redirect control section, then adapt URLs and uncomment each line
    #RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)\ HTTP/ [NC]
    #RewriteCond %{REQUEST_URI} !/?wp-(admin|content|includes|login) [NC]
    #RewriteCond %{QUERY_STRING} !preview=true [NC]
    #RewriteCond %{REQUEST_URI} ^/?subsite-path-goes-here
    #RewriteCond %{HTTP_HOST} ^(www\.)?network-primary\.com$ [NC]
    #RewriteRule ^{REQUEST_URI} [R=302,QSA,L]
    ###### END example section
    #front-end redirects go here
    ##### END Front-end Redirect Controls
    #perhaps some additional custom redirect code exists here
    ##### BEGIN Catch-All SSL Control
    ###### This section should stay down here under the other custom rewrite rules
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)\ HTTP/ [NC]
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=302,QSA,L]
    ##### END Catch-All SSL Control

    ymmv, I usually work with subdomain networks and adapted this from my own code... it should work though ... also changed the redirects from 301s to 302s for you :wink:

    also, just wondering, do you have in wp-config
    define('FORCE_SSL_ADMIN', true);
    define('PROTOCOL', 'https://');

    Cheers, Max

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.