0

We currently have a domain that have a wildcard ssl so our site is something like this,

www.ourdomain.com
ourdomain.com
subdomainA.ourdomain.com
subdomainB.ourdomain.com

and so on. What i want to ask is how to forward this,

www.subdomain.ourdomain.com to subdomain.ourdomain.com

I found this solution cname redirection but to no avail. I also tried adding

www.subdomain

as an A record pointing to our domain IP but still doesn't work. It still not forwarding to the right subdomain without the "www.".

I also tried via .htaccess from here but before my .htaccess do it's job the TLS handshake already detects that our ssl doesn't handle 4th level domains, and it will show security error. So clearly .htaccess won't work.

Hope you guys can help, Thanks.

david
  • 3
  • 4

1 Answers1

1

Please be aware that a wildcard TLS certificate *.example.com will not be accepted as valid for *.*.example.com. The * in a wildcard certificate should match 1 or more non-dot characters.

In other words visitors to https://www.subdomain.example.com will always get a security warning for an invalid certificate BEFORE they can establish a connection to your web server and thus they will never be redirected to https://subdomain.example.com regardless of how you attempt to redirect them. (Unless they click away a number of different errors/warnings).

HBruijn
  • 77,029
  • 24
  • 135
  • 201