One Website with a main domain and a subdomain

Greetings,

I have two A records listed for domain.tld and www.domain.tld. HestiaCP created a website under “WEB” as domain.tld with an alias of www.domain.tld.

When accessing www.domain.tld, I get a SSL certificate error that it points to domain.tld.

I tried to create a new WEB in HestiaCP as www.domain.tld, the CP complains that domain.tld already exists.

How do I fix it so that both domain.tld and www.domain.tld points to the same website? 1) Add -expand to Let’s Encrypt certificate manually? or 2) fix something in HestiaCP to make it work. HestiaCP makes a note that I cannot modify Nginx config files with the server directive.

I must be missing something in the docs. Thank you.

Make the antiquated www a CNAME record.

the dns records shouldn’t matter if its A or CNAME as long as it points to the same server.

having www. as an alias for the non-www domain is the right approach. if you haven’t had that in the first place but only added it after you already got an LE cert you need to get a new one so all aliases are included (simply disable, save and reenable).

if you check the ssl cert within the panel it should show in the details for which domain it’s supposed to work…

2 Likes