Site keep redirecting from https to http

I've created this site: (under domain name, which is added using the "Add New Site" page in wp-admin.

For some reason, this is the only subsite with this issue.

At first it gave too many redirection. Turning off "Really Simple SSL" solved part of the problem.

This however causes some of the backend functions in wp-admin to kick you back to login page, like customize theme.

I tried to add this:

if ( (isset($_SERVER['HTTP_X_FORWARDED_PORT'] ) && ( '443' == $_SERVER['HTTP_X_FORWARDED_PORT'] ))

|| (isset($_SERVER['HTTP_CF_VISITOR']) && $_SERVER['HTTP_CF_VISITOR'] == '{"scheme":"https"}':wink:) {

$_SERVER['HTTPS'] = 'on';

and this:

define('FORCE_SSL_ADMIN', true);

// in some setups HTTP_X_FORWARDED_PROTO might contain

// a comma-separated list e.g. http,https

// so check for https existence

if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https':wink: !== false)


to wp-config but it doesn't seems to solve the issue.

  • Adam Czajczyk
    • Support Gorilla

    Hello iamJayChong

    I hope you’re well today!

    Are you using Domain Mapping plugin or core WP mapping feature and do you have an SSL certificate installed for both original domain and that new, mapped domain?

    The SSL cert for both is necessary to avoid “mixed content/insecure content” issues. As for redirect – if you’re using Domain Mapping plugin, make sure that:

    – original sub-domain is set to use “https://” prefix in address (you can edit that via “Network Admin -> Sites -> [EDIT] for that site -> Settings (tab)”:wink:

    – the prefix in mapped domain settings (“Tools -> Domain Mapping” page in that new site’s dashboard) is set to “https”

    If you’re using core mapping feature, make sure that both “Siteurl” and “Home” URLs in “Settings” tab of “Network Admin -> Sites -> [Edit for the site in question]”:wink: are consistent and both start with “https://” prefix.

    If that doesn’t help, please enable support access to the Multisite so we could check it. In order to enable support access, please go to the “WPMU DEV -> Support -> Support Access” page in “Network Admin” and click on “Grant support access” there.

    Best regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.