Skip to content

Instantly share code, notes, and snippets.

@connor11528
connor11528 / ssl-redirect.html
Created October 18, 2017 19:59 — forked from konklone/ssl-redirect.html
Force a quick redirect to HTTPS on Github Pages for your domain (and only your domain)
<script>
var host = "YOURDOMAIN.github.io";
if ((host == window.location.host) && (window.location.protocol != "https:"))
window.location.protocol = "https";
</script>