Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a site for which i purchased SSL cert and installed.

And it was working fine, I also have a subdomain with which was not on SSL.

Both and are on same IP address.

At later we decided to put SSL only on and then i configured SSL with and it worked fine,

Now the issue is that Google is indexing my site as and when users hits the web , Invalid security warning is issued and when user allow security issue they are shown my contents.

Note: I have my SSL configuration files in /etc/httpd/conf.d/ssl.conf

The contents of the ssl.conf are below.

NOTE: I tried solutions in .httaccess but none of those worked. Like redirecting 301 redirects etc

share|improve this question

2 Answers 2

Since and are on the same IP adress, using https on either of the 2 will use the defined VirtualHost in your ssl.conf, since you did not specify a servername:

Line 84: #ServerName

What you need is VirtualHost on port 443 redirects to http for a given servername

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}


share|improve this answer

You need to get a wildcard SSL certificate:


The * makes it wildcard and thus you can use it on and

share|improve this answer
I do not want to purchase a wildcard certificate. I want on non HTTPS as this is my static contents. – Asghar Oct 24 '13 at 9:22
please read the answer above by Ronald Swets, that is another option you have. – jjohnson Oct 28 '13 at 12:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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