GitHub Pages and HTTPS

GitHub Pages supports HTTPS protocol. It will be good to prefer HTTPS to HTTP. However, I found that if the URLs are not written carefully, the user might be redirected to HTTP URLs.

For unknown reason, GitHub Pages are redirecting the directories without trailing slash to the HTTP URLs. For example, the following URL:

https://loganchien.github.io/cert

will be redirected to:

http://loganchien.github.io/cert/

To avoid this pitfall, please make sure that your URLs are ending with trailing slash if they are pointing to directories. For example,

https://loganchien.github.io/cert/

This URL won't be redirected and work as expected.