Time for some stupid questions. I was playing around with https and ended up ditching it because I couldn't get the basics working. I haven't played around with web development in quite a few years and think I have forgotten more than I ever learned. The questions I'm about to ask may not even relate to Traefik, in which case please let me know and I'll go looking elsewhere (domain related). I suppose that's the big question, which of these issues are handled by Traefik and which ones are handled by something else.
Setup:
Domain names are with NameCheap and DNS point to DigitalOcean (ns1.digitalocean.com, etc).
going to subdomain.mydomain.com works and shows appropriate content such as traefik dashboard, flask site, etc.
What doesn't work:
Putting www in front, such as www.subdomain.mydomain.com shows "404 page not found" but works for traefik dashboard so I'm wondering if this get's handled in flask or in Traefik? I tried searching and came up empty handed, maybe I just searched the wrong thing.
How do you do redirects in Traefik 2.0 to go from http to https automatically so your really only running one website, can you do that? I spent ages trying to do this when I was first trying to learn Traefik and gave up.
This is because Traefik treats subdomains as separate hosts, as it should. The Traefik dashboard is specifically written to not require a host, and therefore works as it should.
As for redirects, you should look at the RedirectScheme Middleware:
Another question regarding redirects; I stumbled on an Containous article that uses a global https redirect (https://blog.containo.us/traefik-2-0-docker-101-fc2893944b9d) but could never get it working. Is this the way we should be heading or should we be putting a redirect on every service as per the example that was posted?
I should clarify: It redirects to https but shows 404 on both services, maybe the TLS isn't working properly???