GitHub Pages https/www Redirect : <p>How can I get <a href="https://www.test.com" rel="noreferrer">https://www.test.com</a> to redirect to <a href="https://test.com" rel="noreferrer">https://test.com</a> when using GitHub pages to host a static website?</p>

<p>I recently enabled TLS (provided by GitHub/Lets Encrypt) for my static site by setting A records at my DNS provider (namecheap). I've also chosen to "Enforce HTTPS" option in my GitHub repository's settings, which handles redirecting requests from <a href="http://test.com" rel="noreferrer">http://test.com</a> to <a href="https://test.com" rel="noreferrer">https://test.com</a>. I have a redirect configured through my DNS provider which forwards <a href="http://www.test.com" rel="noreferrer">http://www.test.com</a> to <a href="https://test.com" rel="noreferrer">https://test.com</a>, but the one missing piece of the puzzle is forwarding <a href="https://www.test.com" rel="noreferrer">https://www.test.com</a> to <a href="https://test.com" rel="noreferrer">https://test.com</a>. </p>

<p>Regarding this issue, GitHub says, "If your domain has HTTPS enforcement enabled, GitHub Pages' servers will not automatically route redirects. You must configure www subdomain and root domain redirects with your domain registrar."</p>

<p>... and my DNS provider says, "It is not possible to set up a URL redirect in the account for the TCP port forwarding from <a href="http://www.domain.tld" rel="noreferrer">http://www.domain.tld</a> (uses port 80) to <a href="https://www.domain.tld" rel="noreferrer">https://www.domain.tld</a> (working via port 443)."</p>

<p>I seem to be caught in an infinite loop of the two services saying the other should provide this functionality.</p>
