sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.19k stars 2.03k forks source link

HTTPS redirect from sphinx-doc.org to www.sphinx-doc.org #7779

Open pyfisch opened 4 years ago

pyfisch commented 4 years ago

Describe the bug The domain sphinx-doc.org is only served over HTTP and not HTTPS. Therefore the connection fails if one tries to visit https://sphinx-doc.org/.

To Reproduce

Open https://sphinx-doc.org/ in your browser. You will see an error message.

Expected behavior

I am redirected always to https://www.sphinx-doc.org/. This can either be achieved with a CNAME record in DNS or alternatively by serving sphinx-doc.org over HTTPS.

Additional context

tk0miya commented 4 years ago

@birkenfeld @shimizukawa Could you check this please? I don't know the settings of sphinx-doc.org.

birkenfeld commented 4 years ago

First, AFAICS we're not advertising https://sphinx-doc.org anywhere.

I checked and this is not trivial. www.sphinx-doc.org is directly CNAMEd to readthedocs, while http://sphinx-doc.org is a stub redirect served directly from Domainfactory. Readthedocs does not support redirect of root domains using A records. Finally, a HTTPS stub redirect would require a SSL cert from Domainfactory, which is not free.

Github pages do support A records, so we could maybe do a construct where the stub is hosted there?

tk0miya commented 4 years ago

I think there is no reason to provide https://sphinx-doc.org (without www in hostname. a.k.a. naked domain) newly. So I think it is better to drop the stub redirection.

birkenfeld commented 4 years ago

http://sphinx-doc.org is referenced in a few places in the repo though, so they should be removed before the redirect is removed.

pyfisch commented 4 years ago

Isn't it possible to use an ALIAS or ANAME record? https://docs.readthedocs.io/en/stable/custom_domains.html

birkenfeld commented 4 years ago

No, I can't create those at Domainfactory.

tk0miya commented 4 years ago

Hmm... I think it is hard to move our documents to GitHub pages (or other platforms) because our website is strongly coupled with RTD's feature (ex. i18n, versioning, and so on).

birkenfeld commented 4 years ago

Don't worry, I wasn't suggesting that :) Just have a small HTML page with the redirect on github, instead of what domainfactory automatically provides at the moment as HTTP only.

tk0miya commented 4 years ago

Ah, okay. I understand. It seems GitHub pages supports an apex domain. How about adding a new repository to do that? https://help.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain

birkenfeld commented 4 years ago

I'm fine with that, let me know when I should change the nameserver entries.