Skip to main content

cname of main domain - SSL issue

Comments

3 comments

  • cPRex Jurassic Moderator
    Hey there! It seems there is some confusion about what gets issued an AutoSSL and why, so I'll see if I can explain that for you here. The reason you get an SSL for the "www" and "mail" subdomains, even though they are setup as a CNAME in the DNS zones, is because they also get added to the Apache configuration on your server. If we check a typical virtual host on a cPanel server, we'll see the following: ServerName domain.com ServerAlias mail.domain.com www.domain.com webmail.domain.com cpanel.domain.com DocumentRoot /home/username/public_html ServerAdmin webmaster@domain.com UseCanonicalName Off
    Since those domains are setup in the Apache configuration for web traffic, they will receive an SSL. If you just create a CNAME in DNS, that will not receive an SSL as that doesn't indicate it is a full domain on the machine. To get the SSL coverage, you would need to create the domain on the server, and not just in DNS. Let me know if that helps to clear things up!
    0
  • Shinoda
    Thank you. Yes, this is making me understand how it is working well now. So here are the new 2 questions: 1- Adding new CNAME domains into Apache configuration file will solve the SSL issue? 2- How to point the new subdomains to main domain's directory instead of using CNAME but the same effect like CNAME to fetch resources from the main domain's directory? Thank you
    0
  • cPRex Jurassic Moderator
    1 - You wouldn't want to create any DNS records before you add the domain in cPanel. The cPanel tools will take care of that automatically 2 - This would be an Alias domain:
    0

Please sign in to leave a comment.