Misdirected request when using wildcard certificate in subdomain

Operating System & Version
CENTOS 7.8
cPanel & WHM Version
v86.0.20

drojo

Registered
May 10, 2016
4
0
1
Barcelona
cPanel Access Level
Root Administrator
Hello,

I have an application at www.example.com and a some point the application redirects the client using javascript to subdomain.example.com, but in some browsers (safari for ios in newer phones) when the browser is redirected I get an error "Misdirected request. The client needs a new connection for this request as the requested host name does not match the Server Name Indication (SNI) in use for this connection".

I am using http2, Both domains use the same wildcard certificate, one domain uses php56 and the subdomain php72.

Any thoughs on how to fix this?