Report this

What is the reason for this report?

Error: common name for wildcard ssl in subdomain

Posted on August 16, 2021

Hello all,

I’m trying to have: (1) *.domain.com in server xx.xxx.xx.1 on apache (2) domain.com in server xx.xxx.xx.2 on apache

both servers has SSL certificate: (1) xx.xxx.xx.1 as wildcard certificate. (2) xx.xxx.xx.2 as let’s encrypt certificate.

After changing the A record for server (2) to point to server xx.xxx.xx.2, I’m facing these errors in server (1):

  1. (net::err _ cert _ common _ name _ invalid)
  2. php warning: file _ get _ contents(): peer certificate cn=`domain.com’ did not match expected

my VirtualHost configuration for server (1)

<VirtualHost *:443> ServerAdmin info@domain.com ServerName domain.com ServerAlias *.domain.com DocumentRoot /var/www/html … </VirtualHost>

I’m try to have domain.com point to wordpress site in server xx.xxx.xx.2, and all subdomain of *.domain.com to server xx.xxx.xx.1



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey there!

Was the SSL for the apex domain and the wildcard domains issued on the same droplet? If so this will fail. You would need to point the apex domain to server 2 and generate the SSL for it on that droplet. You may also need to reissue the SSL for the wildcard subdomains on server one excluding the apex domain.

Hope it helps! Nate

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.