I have a virtual private server. I configured my DNS so that I can host an application for the main domain (let's say domain.com) and I configured the DNS so that *.domain.com is redirected to another application on the same server. I have the following entries in my DNS:
.domain.com type A 92.11.11.11 (fake ip)
*.domain.com type A 92.11.11.11
On the server, I configured the sites as followed:
Name | Binding | Path
DomainApp | domain.com on 92.11.11.11:80(http) | path1
SubDomainApp | 92.11.11.11:80(http) | path2
That way, I can have myname.domain.com or anothername.domain.com redirected to the sub domain app dynamically.
The problem I bought a certificate for domain.com (and www.domain.com). I bound the certificate to the domain app.
The problem is that the server redirects http://myname.domain.com to https://myname.domain.com with my certificate. I get an error in my browser telling me that the certificate is not valid for the sub domain (normal). But I don't want a certificate for my sub domains. I want to be able to access it with the http protocol.
Is there a configuration in IIS that permits that (using https for the domain and http for the sub domains)?