arif
arif

Reputation: 41

purchased ssl for one website but all other website respond to https

I purchased a ssl for one website but all other addon (domain) are working with https with the contain of my ssl site

example: https//www.example.com (I purchased ssl for this one)

In same hosting I have 5 domain like www.domain1.com and like so, but they don't have ssl

But when I try to open www.domain1.com (without ssl) with https its working but with the contain of my ssl site i.e www.example.com

I tried with .htaccess but its not working


    Options +FollowSymlinks -MultiViews
    RewriteEngine on
    RewriteCond %{SERVER_PORT} =443
    RewriteRule . http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

like this many rule but none of them working

Upvotes: 0

Views: 38

Answers (1)

Barry Pollard
Barry Pollard

Reputation: 45905

Ok you've a few problems here.

For a start of its serving your incorrect main site then it's not reading your .htaccess file so that's (one reason) why that won't help.

You must only have one vhost defined for port 443 with the DocumentRoot of your SSL site. You will need to create the same vhosts you have for the port 80 hosts.

You don't explain how you are not getting an SSL error when visiting domains for sites that the cert doesn't cover? Or are you getting it and just ignoring it? And, if so are you OK with that?

Next your rewrite in your .htaccess is wrong as it has port as =443 instead of just 443.

To ultimately solve your problem you need to either get a cert for your other sites, or move them to different IP addresses and or servers (as detailed in this answer: Multiple domains and SSL : all domains use my SSL certificate but I don't want? )

Upvotes: 0

Related Questions