The same domain for website and e-mail

Can I use the same domain for the website and email server?
At the moment my website is and my email domain is It makes problems with TLS certificates:

Cert Hostname DOES NOT VERIFY ( != | |
So email is encrypted but the host is not verified

I have my own certificates for the website and mail server, but I am not sure how to install it.

Welcome @phonesrescue Happy you are here

Yes but its best to have separate certificates for both cases.

To issue custom mailserver ssl certificate go to https://SERVER_URL/websites/ and add ssl

To secure multiple subdomains with same ssl certificate? and

What you need is a Wildcard ssl certificate.

Check this out to add wildcard ssl certificate for your website.

Hi Joseph,
Thank you for your response.
A wildcard certificate is much more expensive than I expected :roll_eyes: So I bought two certificates separately, for and
I tried your solution:

  1. Added SSL certificate from mail.phonesrescue. for on https:/MYCYBERPANEL/websites/
  2. Restarted Postfix and Dovecot


  1. Error on the
    Certificate #1 of 3 (sent by MX):
    Cert VALIDATED: ok
    Cert Hostname DOES NOT VERIFY ( != | |
    So email is encrypted but the host is not verified
  2. When I try to setup SMTP on Mail App on the MacBook:
The identity of “” cannot be verified.
The certificate for this server is invalid.
  1. All my sent emails are going to the spam folder.

I do not have any idea how to set up this properly. Can it be a problem with DNS? I use Cloudflare if it is any difference.

Another question: Can I insert the Chain certificate instead of Normal domain certificate in CyberPanel website settings?

Cert Hostname DOES NOT VERIFY ( != | |

The error is clear that you have issued same ssl certificate to and mail server domain.

Post a screenshot of your CF dns table

My DNS data:

The following records should not be proxied :orange:

it seems that you SSL for mail server is issue but not mapped

run these commands
postmap -F hash:/etc/postfix/
systemctl restart postfix

1 Like

It works!
Thank you so much!