Multisite is not forcing SSL url slug on new sites.

Hi, i have problem. When a new user signs up with new site, the wordpress slug that you see when publishing a new page is still http:
Here is the image

I dont't understand why are new users with sites not created with SSL?

I don't want to use https://wordpress.org/plugins/wordpress-https/ plugin just for that. And I'm not even sure it would fix it.

Is there a way to fix this with some code snippet?

I did change all http's to https in db manually but still new user pages show http when writing new post.

Thanks

  • Bojan Radonic
    • Head of Support

    Hey there @Margus, hope you're well today!

    The easiest way to achieve that on multisite would be to use the suggested plugin. WordPress HTTPS plugin should work since all it does is redirects HTTP to HTTPS.

    Alternatively you could try using this, place this into functions.php:

    if ( is_ssl()  ) {
    wp_redirect( 'https://' . $_SERVER[ 'HTTP_HOST' ] . $_SERVER[ 'REQUEST_URI' ] );
    exit();
    }

    Hope this helps :slight_smile:

    Cheers,
    Bojan

  • Margus
    • Flash Drive

    Thanks, but it didn't work. Sent it to redirect loop.
    One reason I don't want to use plugin, is that everything else works fine and redirects, so it's kind of like a "cosmetical" problem, I just don't like the http slug when everything is https. Also the plugin is over 2 years old and I don't trust it.

    Can anyone else with ssl multisite check, is your slug fine or also http?

    Maybe I can add manually https somewhere in the database?

  • Bojan Radonic
    • Head of Support

    Hey there @Margus, hope you're well today!

    Could you please you can send us your details through our contact form so we can take a closer look? You can send them here https://premium.wpmudev.org/contact/ using this template:

    Subject: "Attn: Bojan"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me :slight_smile:

    Best regards,
    Bojan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.