Search code examples
amazon-web-servicessslwebhttpsamazon-ecs

I deployed a react app to AWS ECS and bought a custom domain, but I can not access it with "www" before the domain name


so I can do "domain.com"

but I cannot do "www.domain.com"

additionally, when I add "https" to the beginning I get a "connection not private" message, however I have a public cert from amazon.

any ideas what's up with either problem?


Solution

  • The www part is a subdomain of domain.com. You will need to handle routing when users visit this subdomain. You can either serve the same files as on the root domain, or you can redirect to domain.com.

    To access your site via https you need to configure SSL.

    You can use CloudFront and Route53 to solve these issues.

    Here is a guide on handling routing for subdomains in Route53.