[Domain Mapping] DM http/https in front-end causing issue in non https mapped domains customizer

After pushing http/https in front-end through Domain Mapping plugin, customizer of the non https mapped domains started to request SSL as well.

I have already tried the given codes at https://premium.wpmudev.org/forums/topic/all-sites-using-a-domain-cant-use-customize-feature:

if(! class_exists('disable_ssl_redirect') ): class disable_ssl_redirect{
function __construct(){
add_filter('dm_prevent_redirection_for_ssl', '__return_true');
new disable_ssl_redirect;

add_filter('dm_prevent_redirection_for_ssl', '__return_true');
None of them have worked. What should I do about that?

Thank you very much! :wink:

  • Adam Czajczyk
    • Support Gorilla

    Hello diegpl

    I hope you're well today!

    Those "non-SSL mapped domain" - you mean that the mapped domain for such sub-sites is set to use "http" protocol and there's no SSL cert for it, right? What is the current protocol setting for the original address of such sub-sites: is it http:// or https://?

    I'm asking because it's quite a common issue that the sub-sites do follow "http/https" setting of the main site while they are not necessarily protected by SSL and such mapping could cause additional issues. So, if the mapped domain is a "non-SSL" domain and the sub-site does not have SSL certificate to protect it, the original URL for that site should also be set to use "http" protocol only and not "https" - that can be set by editing the site on "Sites -> All sites" site list page, in "Settings" section after entering "Edit" screen for that site.

    That's one thing to be checked. The second one is also to make sure that for those "no-ssl" sites there's no any forced redirect to "https" too.

    Could you check that please?

    Best regards,

  • diegpl
    • Syntax Hero

    Hi, thank you for your answer. I`ve actually set force http/https in front-end pages on Domain Mapping plugin only for original domain. However, all its subdomains were forced over https as well, what I can not deal with since they are created dynamically through GF NBT integration. So I used the below code:

    add_filter( 'set_url_scheme', function ($url, $scheme, $orig_scheme) { $arr=parse_url($url);
    if ( preg_match( '/.*\.xxxxx\.com/',$arr['host'] ) ) // its a subdomain, change the scheme to http
    $url = preg_replace('(https)', 'http', $url); return $url; }, 10, 3);

    It worked well, but mapped domains customizer seem to be is requesting a secure cookie as I told you. Its original subdomains are working alright without https, even at customizer. So, any idea to solve that problem? Thank you!

  • Adam Czajczyk
    • Support Gorilla

    HI diegpl

    Thank you for explanation and I apologize for the delay on my end.

    I remember that you mentioned this ticket in your other thread about sub-sites login where I asked you not to "mix" the tickets but after looking into it more, I now see how this may have something in common.

    Would you mind enabling support access to the site so I could take a closer look? To do so, please go to the "Network Admin -> WPMU DEV -> Support" page in your site's back-end and click on "Grant support access" button there.

    Since it's related to sub-sites, please also leave additional information for me in the text field below "Access active for X days" on the "Network Admin -> WPMU DEV -> Support" page (this field will be available after support access is open) about:

    - on which example sub-site I could try it (preferably some "less important" one; or you can create a "test subsite" for me)?
    - just in case: admin-level login and password to that sub-site so I could also get in there if I wasn't able to login

    Please note: please do not post that info here, in the response, just put them in the aforementioned text box inside your site.

    Let me know once that's done, please.

    Kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.