0

My setup is as follows:

User goes to subdomain.mainsite.org.uk.example The site I want to be visible is www.site2.example, however they still have to see subdomain.mainsite.org.uk.example in the URL address bar.

I have set up a DNS mask with forwarding, so now accessing subdomain.mainsite.org.uk.example will keep this as the URL, but show the content from www.site2.example as requested.

However, I only have a certificate valid for www.site2.example, causing the SSL certificate to be invalid.

How do I go about setting this up so the site is secure? I've tried searching online endlessly but can't find any resources that I fully understand (I'm pretty new to SSL stuff).

Patrick Mevzek
  • 9,921
  • 7
  • 32
  • 43
  • 1
    You can not have it both ways: if you want your users to see `subdomain.mainsite.org.uk.example` you need a X509 certificate that matches this name. The certificate for `www.site2.example` is irrelevant in this case. Otherwise any website could impersonate any other one. – Patrick Mevzek Apr 16 '18 at 20:54

1 Answers1

0

You will need a certificate which is configured for both www.site2.com and subdomain.mainsite.org.uk. You can add more than one domain to a certificate through the use of Subject Alternative Names (SAN). You may also want to consider adding site2.com.

Andrew
  • 2,142
  • 2
  • 19
  • 25
  • Two separate certificates will also work. (If the clients are so outdated that they don't support SNI, you will need a separate IP address per certificate.) – kasperd Apr 16 '18 at 20:19