How to force WP motorists to use https after activating SSL wildcard?

I have a multisite setup with sub-domains and domain mapped installed. And I’ve modified the htaccess file in order to redirect all traffic to https.

I’ve setup domain mapping to force SSL for the mapped domains, but I cannot find a way to modify the site URL in WordPress automatically. It keeps creating subsites using HTTP instead of HTTPS.

In the site settings, the subdomains are all http://subdomain.mainsite.com

instead of https://subdomain.mainsite.com.