NET::ERR_CERT_COMMON_NAME_INVALID in Chrome (and Chromium based Edge)

I was getting the above error in Chrome and Chredge (Chromium based Edge) for a new cert I issued from our on-prem AD CA. There was no similar error in IE, and I didn’t check Firefox as I didn’t have it installed. The cert subject seemed fine and had the correct name etc.

If you get this the fix is to add the name and FQDN etc. also as Subject Alternative Names (SANs). This is what I typically do and that’s why I didn’t encounter this so far (but I have a vague memory of encountering this in the past which is why I tried the fix) but today I was in a hurry and skipped the SANs and just went with the Common Name. Funnily enough when I Googled on the error I didn’t get any useful hits so thought I’d create this post in case it helps.

Update: Just to add if you want to create certs with SANs launch certlm.msc on the machine and create a new certificate request from there. Don’t do from IIS Manager as that’s the easy way :) but doesn’t let you choose a template where you can specify the SANs.