I have a domain for a public-facing static website that loads fine whether it’s entered into the browser as example.com, http://example.com, or https://example.com.
I have a private (accessible by login) subdomain for a Discourse forum that loads fine whether it’s entered into the browser as discourse.example.com, http://discourse.example.com, or https://discourse.example.com.
The subdomain for Discourse is achieved by addition of a record to the AWS Route 53 hosted zone:
Record name: discourse.example.com
Record type: A
Value: 123.45.678.90
Alias: No
TTL: 300
Routing policy: Simple
I’d like to provide a shorter alternative/secondary subdomain for Discourse. So I added another record, nearly same as the prior, only with the record name changed from discourse.example.com to d.example.com.
Strangely, this works in HTTP, but in HTTPS the browser warns:
Your connection is not private
Attackers might be trying to steal your information from d.example.com (for example, passwords, messages, or credit cards).
Learn more
NET::ERR_CERT_COMMON_NAME_INVALID
What am I missing? Should I be going about this a different way?
My AWS Certificate covers example.com and *.example.com. My CloudFront distribution covers example.com and d.example.com. I have disabled my Amazon CloudFront cache during this configuration temporarily to ensure that’s not a factor.
I found a solution:
d.example.com).discourse.example.com).http://d.example.com.s3-website.aws-region-2.amazonaws.com).d.example.com).d).