1

So I have a main domain site called: site.com and I recently bought wildcard SSL to try and get the main domain and all its sub-domains to be encrypted and be force all files to use https. After signing up for the service the certificate covers all domains like: *.site.com but all my subdomains have their own name like site2.com site3.com siteN.com etc. I can get https if i use site2.site.com but I need it to be site2.com with https. I've installed HTTPS plugin and if I put site2.site.com as the certificate root it works but the URL is then site2.site.com. Is there a way I can force https through site2.com? My .htaccess file for both main domains and sub-domains is:

# 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
SetEnvIfNoCase User-Agent "^libwww-perl*"  block_bad_bots
Deny from env=block_bad_bots

EXTRA NOTE: I dont have access to the vhost files so I cant create virtual hosts

2 Answers 2

1

I found a simple plugin that did the job for me. This is what my .htaccess file looks like now for my sub-domain:

<IfModule mod_rewrite.c>
RewriteEngine on


RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]


# BEGIN WordPress

#RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
SetEnvIfNoCase User-Agent "^libwww-perl*"  block_bad_bots
Deny from env=block_bad_bots
</IfModule>
1

It is not possible that certificate installed on site2.site.com and pass encrypted traffic on site2.com which is not secured with SSL.

Wildcard certificate can secure root domain and its unlimited sub-domains, so as you mention above, you have a wildcard certificate which is issued on *.site.com and working correctly on all sub-domains like site2.site.com, site3.site.com.

Now you have same domain names that matching with your sub-domain names like site2.com, site3.com, etc. and you want to setting up secure environment over those multiple domain names. In this case, wildcard certificate will not work as it could not provide security for multiple websites. To cover multiple domains and its sub-domains you have two choices as below.

Multi Domain SSL:

If you have limited numbers of domains and its sub-domains, you can use a single Multi Domain SSL. It can secure up to 100 subject alternative names (SANs) using a single certificate.

For Example:

site.com (primary domain)
site2.site.com
site2.com
site3.site.com
site3.com
anysub.anydomain.tld
anydomain.tld

Multi-Domain Wildcard SSL

If you want secure multiple websites and its unlimited sub-domains, then Multi-Domain Wildcard SSL certificate is the best choice. It can secure up to 100 root domains and its unlimited sub-domains.

For example:

*.site.com
*.site2.com
*.site3.com
*.site99.com

For more information about above both options, you can refer this link https://www.ssl2buy.com/multi-domain-ssl

1
  • Thanks for the input, if you notice in my question I do state that I bought Wildcard SSL for unlimited sub-domains. Is this the same one you're talking about in your answer?
    – Zayd Bhyat
    Nov 23, 2016 at 2:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.