Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do you add an alias to a subdomain?

Discussion in 'General Discussion' started by jupitered, Feb 3, 2018.

Tags:
  1. jupitered

    jupitered Registered

    Joined:
    Feb 2, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Root Administrator
    Hello,

    I want to create an alias for an existing subdomain, which in itself is also a subdomain from the same domain.

    alpha.example.com # website's main address
    bravo.example.com # website's secondary address

    I tried adding an entry for bravo.example.com in example.com's domain zone (both as an A and a CNAME record), and adding it as a corresponding alias in the userdata file in /var/cpanel. This works, except AutoSSL cannot verify bravo.example.com, showing the following error in the logs:

    Code:
    0:00:47 AM The website “alpha.example.com”, owned by “example”, has a valid SSL certificate, but additional SSL coverage may be possible for the domain “bravo.example.com”. The system will attempt to replace this certificate with one that includes this additional domain.
     0:00:47 AM WARN The domain “bravo.example.com” failed domain control validation: You do not have a document root for the domain “bravo.example.com”.
     0:00:47 AM AutoSSL cannot add any new domains to SSL coverage for the website “example.com”.
    I've verified that I can visit bravo.example.com in my browser, and works as expected, but https does not (obviously) saying the certificate is invalid.

    So, I'm figuring I'm missing something, since I had to edit the files manually, and I do not see anything in the managing site (that is clear to me) about adding aliases to an already existing subdomain (only redirects, which is not what I want).

    What's the proper way to do this? Or if not currently possible via cPanel, is there a configuration file I can edit manually so that both alpha and bravo are included in the same certificate?

    Thanks in advance.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,484
    Likes Received:
    1,612
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can't do this in the cPanel UI via the Aliases option, but you can add the alias to the subdomain using Web Host Manager:

    "WHM Home » DNS Functions » Park a Domain"

    Try reverting the manual modifications you made and using the above option to see if that solves the issue.

    Thank you.
     
Loading...

Share This Page