pulumi / pulumi-aws-static-website

Apache License 2.0
11 stars 5 forks source link

How to have a subdomain www #18

Open PhilAndrew opened 1 year ago

PhilAndrew commented 1 year ago

How to have a subdomain www. This pulumi-aws-static-website works for the domain but if I go to https://www.domain.com then it does not load the website. How to have a subdomain www?

thomas11 commented 1 year ago

Hi @PhilAndrew, www.domain.com is technically a separate domain from domain.com. This AWS document lists some ways of redirecting the "www." domain to the non-www domain. Does that help?

sean1588 commented 1 year ago

Hi @PhilAndrew - I've addressed this issue and added a subdomain input property to the component. So now you can set a target domain along with an optional subdomain. For example setting the targetDomain to "foo.com" and the subdomain property to "www" will result in the site being served at both foo.com and www.foo.com. You just need to update the version of the component to the latest one that was just published, v0.3.0, and you should be able to use the new subdomain input property that was added. Hope this addresses your issue, and feel free to reach out if you need anything else.