Redirect https://www.subdomain.domain.com is not redirecting to subdomain.website.com [closed]

You don’t appear to have a valid SSL cert installed on your server that covers the hostname www.subdomain.example.com, ie. the www sub-subdomain`.

The only way to resolve this and not get the browser warning is to install a valid certificate on your server that covers the required hostname.

Otherwise, unless the user accepts this invalid certificate in their browser (which they should not), then the request never actually reaches your server, so never sees the redirect.