Need help setting up "www" part of SSL Certificate

How can I include SSL for the "www" version of my domain. For example, app.mydomain.com is working, but the redirect for www.app.mydomain.com isn't working because the SSL certificate is not configured to include the "www" part of the domain name. Can anyone help?
13 Replies
Chaika
Chaika6mo ago
Cloudflare issues you a wildcard universal certificate for free, *.mydomain.com, however Cert wildcards only cover one level/label. You'd need another wildcard or specific certificate for that. You could buy Advanced Certificate Manager for $10/month, which would allow you to do it. That being said, it's not standard to have a www subdomain on other subdomains.
Lawrence
Lawrence6mo ago
Thank you. I know, I am trying to setup AWS Amplify and the main domain of my app is app.mydomain.com, but whenever I try to reach www.app.mydomain.com, it fails. What I am trying to do is setup a redirect from www.app.mydomain.com to app.mydomain.com. What I have just done is create 2 separate domains that redirect to my amplify app, one is the app.mydomain version and one is the www.app.mydomain version. So I have setup both DNS CNAME records, the only issue I am having now is that the www version doesn't have a valid SSL. 1. Can I optimize this process to setup a redirect from cloudflare to automatically redirect "www" to "app.mydomain.com"? So I don't even have to use AWS Amplify to try to achieve the redirect. I have tried this method, that didn't work. https://developers.cloudflare.com/pages/how-to/www-redirect/ 2. If that is not the case, can I setup AWS Amplify to do the redirect for me succesfully? 3. Any other recommendations?
Redirecting www to domain apex · Cloudflare Pages docs
In this guide, you will learn how to redirect the www subdomain to your apex domain (example.com). This is a common question and can be achieved by …
Metriusz
Metriusz6mo ago
What issue did you have with the www redirect? Using rules
Lawrence
Lawrence6mo ago
It didn't work I set it up exactly as the guide, and nothing happened.
Chaika
Chaika6mo ago
Cloudflare just doesn't have a certificate that covers it, it's as simple as that the universal covers any first level subdomain like app but you would need either *.app (wildcard) or www.app (Exact) certificate for that You shouldn't need it eitherway though, www subdomains for your root (www.mydomain.com) are a relic of the past, and not usually done on subdomains The solution is just to get a certificate which covers it. Which you can accomplish either by buying ACM within Cloudflare, or unproxying it and having AWS Amplify (if it can) issue a certificate and do the redirect for you I should say, that's the solution if you really need that to work for whatever reason, like I said above, not standard to need that
Lawrence
Lawrence6mo ago
So what would you recommend? My preferable way of doing it would be through cloudflare, jsut a simple redirect to the app.mydomain.com but I can't seem to get that to work either I have a custom certificate from ACM that covers the domain names, but I can't figure out where to assign that certificate to the Amplify App
Chaika
Chaika6mo ago
What's the custom certificate that you have? What are the SANs of it (can censor domain if you want) oh do you mean Amazon ACM and not Cloudflare ACM?
Lawrence
Lawrence6mo ago
Yes, I have just setup an AWS ACM, sorry for the confusion. I can't seem to find a place to attach that certificate to the App in Amplify...
Chaika
Chaika6mo ago
I can't help with AWS, but I can say if you unproxy/make the dns record dns-only in Cloudflare for www.app (understanding you'd be forgoing CF's DDoS Prot/WAF/analytics for it), then as long as you could get AWS to use that certificate and handle the redirect it would work otherwise you could buy CF's ACM, issue a cert covering it, and configure the redirect on that side
Jack Shelton
Jack Shelton6mo ago
Not sure if I have this problem or not. I have a bulk redirect from anything www. to the main site. Using everything through cloudflare. it is a static site
No description
Jack Shelton
Jack Shelton6mo ago
Looks like an ssl protocol error
Chaika
Chaika6mo ago
Please make your own post and include the domain name
Jack Shelton
Jack Shelton6mo ago
Got it