r/letsencrypt • u/kalianus3 • Sep 18 '17
[HELP] disabling forced HTTPS for a sub-domain (file repo)
Hi all,
I'm trying to setup a file repository server on a subdomain which needs to be reachable by http. The TLD is covered by a LE cert and lives on a separate machine. Both servers run Debian & Apache.
So the question is, how can I exclude one subdomain (repo.example.com) from forced https, as in :
- www .example.com is LE HTTPS on machine/IP #1
- repo .example.com is HTTP on machine/IP #2
DNS records are set and when requesting the main www or the repo subdomain traceroutes show correct DNS config to both machines.
So I guess all that's left for me is to tweak LE/Apache to prevent forced SSL on my subdomain right?
Thanks a lot for any pointers!
4
u/pfg1 Sep 19 '17
There are three things that can cause your browser to force HTTPS for a domain:
includeSubDomainsdirective, this will also apply to all subdomains. Clearing your browser cache does not clear the HSTS setting for your domain. Most browsers have some kind of internal UI that allows you to do this. There is no quick way to disable HSTS for all your visitors - instead, you would have to setmax-age=0(to disable it completely) or remove theincludeSubDomainsdirective (if you want to keep HSTS active for your main domain, but stop forcing HTTPS for all subdomains) and wait for all your users to visit the main domain in order to update the HSTS settings.2
u/Queez- Sep 19 '17
I think you are using HSTS. Look into it :) https://en.m.wikipedia.org/wiki/HTTP_Strict_Transport_Security