Lets Encrypt/Traefik - only securing www.domain.com not https://domain.com

Hey team,

We are seeing that the domain.com is unsecured, but www.domain.com is secured. I’m sure this is an error that I’ve I’ve created - any guidance on how to correctly setup / rectify would be great.

In the ‘WEB’ section of project settings, should I just have https://domain.com instead of https://www.domain.com listed, and that will essentially then act as a wildcard?

I currently just have https:// and then the ip address (elastic IP from AWS).

NodeJS - Docker AWS.

I would go for the without-www version because this means less typing.

As far as I know, if you intend having sub-domains like subdomain.maindomain.com, then you would need the www version.

I have my websites setup to be redirected to without-www. See

https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs

Thanks @ben are you redirecting at the domain registrar?

No, the Plesk panel.

Edit: Try www.pleysier.com.au

1 Like

Thanks Ben, this might be the simplest option - to just redirect without the www to the www from AWS

If you use traefik we actually now generate secure certificate for both with and without www.

We also auto redirect from the one to another, depending which one you specified as primary web url on your target settings.

Hi @George we do use Traefik - but the above as you suggest isn’t actually happening. Anything I should do differently?

You just need to go to the project settings and re-save them, so that the new domain settings get generated and then deploy again.

1 Like

Awesome. Thank you I’ll try this. :+1:t2:

Hey George! Hope all is fine!

www is not working here…Already did what you proposed and its not working properly…should I change DNS config on DO?

best!

Yes obviously you have to define in your DNS that both and with www and without point to the same IP.