GitHub Pages Can’t Enforce https For Custom Domain

For some reason I’m trying to enforce https for my custom domain in settings of the website repository but I can’t enable it and it says my site is not configured to support it. My web host is 1&1 and I use Cloudflare for my dns name servers.

In order to generate an HTTPS certificate for a Pages site your custom domain’s DNS records need to be pointing directly at GitHub’s DNS records.

Cloudflare enables their HTTP/DNS proxy feature by default, meaning GitHub isn’t able to see the DNS records required to generate an HTTPS certificate. You’ll need to disable this for any DNS records that point towards GitHub.

Disclaimer: Disabling the HTTP/DNS proxy may interfere with other Cloudflare services. If you use other Cloudflare services with your site, we aren’t able to guarantee that these will continue working. For more help with this, I’d recommend reaching out to Cloudflare’s support team.

If you’d still like to continue, you can follow the instructions below:

First of all, make sure you’ve set up your DNS records in Cloudflare according to the instructions in our help documentation:

https://help.github.com/articles/using-a-custom-domain-with-github-pages

To disable CloudFlare’s DNS/HTTP proxy, you’ll need to log in to your Cloudflare account, navigate to the DNS settings page for your domain, and click on the orange cloud icon next to any DNS records related to your GitHub Pages domain. The cloud icon should turn grey when it’s correctly disabled.

It can take up to 72 hours for these DNS changes to propagate across the internet. Once they do, you’ll need to trigger a recheck of your DNS setup by visiting your repository’s settings page. This will kick off the process of provisioning an HTTPS certificate for your domain name.

Once your certificate has been provisioned, you’ll then be able to enforce HTTPS by checking the “Enforce HTTPS” checkbox.

Alternatively Cloudflare provide an SSL service for domains set up on their service too so you may want to also consider using that option instead, though you won’t see the status of that in the settings page of your GitHub repository.