Setting up website via Github Pages + Cloudflare

My website is not working. It might be helpful to state that previously I had the same domain setup using namecheap and cloudflare, but not github. Rather it was using Notion (steps here).

I decided to push my own website using Github, but I’ve gotten a bit confused as it’s not working.

Github Pages shows everything is smooth:

(I had more screenshots, but new users can only post 1…)

Website is Do you have any troubleshooting steps? How can I solve this?

Cloudflare is showing there’s been visits in the past 24hrs but the website itself is not woring

Namecheap matches Cloudflare Nameservers

Hi @agm93,

If you set the DNS record pointing to Pages to :grey: and wait a few minutes, does the site shop up OK or do you still have the same issue?

Hi @domjh , how do you mean to do this? Perhaps on Namecheap (domain provider)?

I currently have it on custom DNS, if I want to use host records I believe I have to use basic DNS

Hi @agm93,

That image shows the nameservers you’ve specified for your domain - they are correctly configured.
You need to go to the Cloudflare dashboard > DNS to manage DNS records. Once you’re there, you can switch off the “Proxy” toggle for the DNS record pointing to GH Pages, and see if that makes a difference.

1 Like

Hi @albert , which one is pointing to GH pages? (sorry I’m a rookie lol)

It doesn’t look like any of them are pointing to GH Pages - that explains why it doesn’t work :slightly_smiling_face:
You need to add a CNAME record in Cloudflare dashboard as shown in the image below (you’ll have to delete the existing A record first).

1 Like

Thank you @albert! The website on is actually different than the one I’m looking to push. Should I put

Yes, IIRC, you will need to first create the CNAME record as shown above. Then go to your repo > Settings > Pages, and type in the custom domain field. The repo being project containing the website you want to be served at

I’m getting the error “DNS Validation Error (Code: 1004) CNAME content cannot reference itself.”

Ahh, yeah. You will probably have to disable proxying on the CNAME DNS record.

Still not working, should I delete the other CNAME maybe?

I apologize if I was being unclear - the target has to be, not And you should probably make the WWW subdomain record to point at instead of NameCheap Domain Parking :slightly_smiling_face:

Ah I see, I also want to make sure I’m clear that I don’t want this website: to show on , is that considered in this implementation? (sorry for the delay in my response, for some reason Gitihub stopped allowing me to post messaages due to a flag)

I think there was a URL for this reposatories github page but it went away once I entered my custom domain

Reply from albert:

Yes, you will have to point your custom domain (apex and www) to no matter which GH Pages repo you want on there. Then you’ll have to add as a custom domain in the repo settings of the GH Pages project you want to be served on

I also recommend you check out this post, it’s quite old so the UI is different but it’s the same idea:

1 Like

Awesome, I’m live! Thank you :pray: @albert @WalshyMVP


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.