- Newest
- Most votes
- Most comments
I understand your confusion regarding SSL/TLS certificates for AWS Lightsail container services. Let me clarify the process and provide a solution for your situation.
First, it's important to note that you can indeed create a single SSL/TLS certificate in Lightsail that covers both your apex domain (abc.com) and its www subdomain (www.abc.com). This is actually the recommended approach.
When creating the certificate, you should add both domains to it. In the certificate creation process, you can specify up to 10 domains or subdomains. So, you would enter abc.com as the primary domain, and then add www.abc.com as an additional domain.
After creating the certificate, you need to validate it. Lightsail will attempt to do this automatically, but if it fails, you'll need to add CNAME records to your domain's DNS at your registrar. The exact records to add can be found in the "Validation details" section of your certificate in the Lightsail console.
Once the certificate is validated and shows as "Valid" in Lightsail, you can then enable custom domains for your container service. Here's how:
- Go to your container service in the Lightsail console.
- Navigate to the "Custom domains" tab.
- Click on "Enable custom domains".
- Select the certificate you created that includes both abc.com and www.abc.com.
- Choose both domains from the certificate to use with your service.
By following these steps, you should be able to use both abc.com and www.abc.com with your container service, and both will be covered by the same SSL/TLS certificate.
If you're still encountering the "Duplicated domains provided for service" error, it's possible there's a conflict with existing settings. In this case, you may need to disable custom domains first (if they were previously enabled), then re-enable them following the steps above.
Remember, your certificates are valid for 13 months, after which Lightsail will attempt to automatically revalidate them. It's important to keep the CNAME records you added for validation in your domain's DNS, as they're needed for this revalidation process.
By implementing this solution, both abc.com and www.abc.com should be accessible via HTTPS and show as trusted in web browsers.
Sources
Create SSL/TLS certificates for secure Lightsail container service domains - Amazon Lightsail
View SSL/TLS certificates for Lightsail container services - Amazon Lightsail
Enable secure web access with custom domains in Lightsail - Amazon Lightsail
Validate SSL/TLS certificates for Lightsail container services - Amazon Lightsail
I´m sorry, I followed the steps, I have a valid certificate for both my domain with "www" and without. The issue is that its not possible to attach it to the container service. Whatever I do, I always end up with error "Duplicated domains provided for service". Is there any other possible workaround?
answered a year ago
Relevant content
asked 3 years ago
asked 4 years ago
