I add SSL on my multisite and I can not login to my sub directories

a redirect loop here.
https://yourteaching.com

I add SSL to my multisite and I can not login to my subdirectories maybe because of redirecting i dont know i need all my sub directories to use ssl but there is somthing wronge

you have the support access and here is my .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

  • Michael Bissett

    Hey @Fahad! :slight_smile:

    As you're running a subdirectory Multisite here, you're going to need to use a different set of .htaccess rules. Could you please replace what you have there presently with these:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    And letting me know if that helps please? :slight_smile:

    Kind Regards,
    Michael

  • Fahad

    Thanks I really appreciate but I have 2 questions before I try this if it is OK
    1- If I change all my domains instead of multisites and used WordPress single site it is better because for days I start thinking to use normal site no need to multisite and is that possible to change it again from multisite into single normal site ? and how to do that ?

    2-Can I use your mapping domain plugin later to create new multisite and included all my single sites that I was talking about above under one WP multisite dashboard ? or did i misunderstand the using of this plugin and this is not how they can use it

    because i am thinking to change all my multisies in all domains and make them single sites then create new multisite and included all of them again under one big multisite network ?

    please elaborate your response with more details and examples so i can judge the best solution for my business . thanks

  • Fahad

    I checked your multi domain and domain mapping and I have an idea I need your opinion if that is possible and how to do that perfectly. I have 10 multisite just new if I change them from multisite into single site and then buy new domain and use multi domain and domain mapping one this new domain and add that 10 domains as a part of the new multisite and if I need to use SSL on this new multisite especially if all that 10 domains have already SSL on them .

  • Michael Bissett

    Hey @Fahad,

    1- If I change all my domains instead of multisites and used WordPress single site it is better...

    because i am thinking to change all my multisies in all domains and make them single sites then create new multisite and included all of them again under one big multisite network ?

    To answer your question about exporting the subsites from a single site, I would advise having a look at the "Exporting a Site from a Multisite Set Up and Importing It to a Single Install" section in this article:

    https://premium.wpmudev.org/blog/import-export-wordpress-sites-multisite/

    2- Can I use your mapping domain plugin later to create new multisite and included all my single sites that I was talking about above under one WP multisite dashboard ?

    Our Domain Mapping plugin is designed to map domains to subsites that already exist on a Multisite network. As for the importing of single site installations into a Multisite, have you had a look at this?

    https://premium.wpmudev.org/blog/migrating-multiple-blogs-into-wordpress-multisite/

    ...and if I need to use SSL on this new multisite especially if all that 10 domains have already SSL on them

    If you're looking to use SSL on these 10 sites you're looking to import to the new Multisite you're planning to create, then yes, you'll need to have a SSL certificate set up. :slight_smile:

    Kind Regards,
    Michael

  • alex

    Hey, I ran into this immediately with my setup.

    When I got started I wanted SSL, and had an SSL cert installed on my primary domain setup with WPMU. I too ran into issues with the subdomain sites. When creating them, their activation links would be in https:// which the SSL certificate was not valid for, so when browsing to the subdomain sites a browser notification that the SSL cert for the site did not match the site being accessed.

    Obviously the SSL cert was setup for http://www.website1.com and when browsing to subdomain.website1.com the cert was not matching up.

    Putting in a manual exception for this in my browser, the subdomain site activation URL would not resolve because it was in https:// and not http:// resulting in a loop and inability to activate the site.

    Manually accessing via http:// wouldn't work as it would automatically change to https:// and around and around i went. WSOD and non-activation.

    For timeliness, I ended up actually pulling the SSL cert off and using it for another site.

    After research and investigation, I found the overall solution is if you want to have your main site and every subdomain site is to buy a WildCard SSL Cert.

    If you are using WPMU subdirectory sites, buy a normal SSL cert for your main domain (I've never done this but was the solution presented to me)

    Or, if you are using WPMU subdomain sites buy a Wildcard SSL cert for your main domain. This will enable all your subdomain sites to work with https://

    As for domain mapping - from my research you can do this successfully - but again the client browser will present a warning that the SSL cert is for http://www.yourWPMUdomain.com and not http://www.themappeddomain.com.

    The first solution I could find was to purchase a single SSL cert for each new mapped domain. This could be expensive if you are just doing your own thing but could have profit opportunities if you are selling to clients as single SSL certs can be bought quite cheap and you could charge clients a bit more.

    But the ultimate solution is a Multi-Domain SSL Cert, which enables you to secure hundreds of different domains with https:// even though they are different. In this way any and every domain would be secured.

    You said you only had 10 sites, so I wouldn't recommend this exactly for you.

    Note:
    - it is cheaper to buy a Wildcard SSL Cert for your subdomains if you are just using that.
    - you only need a Multi-Domain Cert if you are domain mapping lots and lots of domains and need SSL for all of them.
    - If you are only mapping a few domains, just buy new individual certs for them for cheap.
    - if you have a WPMU subdirectory multisite network, hooray, you just need 1 basic ssl cert and you're done. (but sorry, no domain mapping for you or your back to Multi-Domain cert)

    That's my wrap on SSL certs. IMHO, unless you're doing ecommerce activities don't bother with them. They cost money, require registrations and verifications of all sorts (read, info leakage) and if you get it wrong will scare away users who get popups about invalid certs etc. If you wanna go the big bang and do Multi-Domain SSL Certs, have a business model in place that's gonna handle the cost :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.