Having trouble connecting a custom domain to GHpages with Cloudflare DNS

Hello everyone,

I am having a hard time connecting my custom domain name with my GH pages using Cloudflare DNS. I will post below pictures of all my setting and hopefully someone can help me. Thanks :slight_smile:

Cloudflare doesn’t let me upload more than 1 image thats why I did that horrible stitching :slight_smile:

Is your domain vogdanis.com? If so it works just fine.

A couple of things:

  • on GH Pages you can’t have both the root and www active together, you need to redirect one to the other. Use a Page Rule with a 301 (or 302 if you expect things to change soon regarding the redirects) from www.vogdanis.com/* to https://vogdanis.com/$1.
  • The Page Rule you have is basically half of Always Use HTTPS, since it applies only to the www subdomain. Delete that and use the actual Always Use HTTPS toggle in the SSL/TLS settings that applies domain wide.

For the most part the config works just fine.

Ciao Matteo,

yes thats my domain vogdanis.com works fine now. If i add the www. prefix then its not accessible again I will try to do what you suggested with the rule

Also vogdanis.com works but not always for example now i just tried to access it and I get the following error
DNS_PROBE_FINISHED_NXDOMAIN

Thats the new rule is it correct now?

The www subdomain is not accessible because in GitHub you have configured it without it, so it won’t respond to that. Either redirect to without it (making the root the main website) or change the config in GitHub and redirect to www.

That is most likely something local to your DNS resolver. Works just fine here.

Can you do a dig vogdanis.com or nslookup vogdanis.com (Linux/Mac the first, Windows the second).

Correct. Now that should work.

; <<>> DiG 9.10.6 <<>> vogdanis.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 60847
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;vogdanis.com.			IN	A

;; Query time: 383 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Sun Apr 19 12:19:51 EEST 2020
;; MSG SIZE  rcvd: 41

Yiannis:~ Yiannis$

I guess that means it cannot resolve it?

Got a different response now

; <<>> DiG 9.10.6 <<>> vogdanis.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18379
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;vogdanis.com.			IN	A

;; ANSWER SECTION:
vogdanis.com.		283	IN	A	104.31.80.109
vogdanis.com.		283	IN	A	104.31.81.109

;; Query time: 3 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Sun Apr 19 12:22:48 EEST 2020
;; MSG SIZE  rcvd: 62

Correct. And that is the correct one. Your local DNS server is somewhat broken, nothing I can do there, though… change it :slight_smile:

PS: stop posting 3 times for each of my reply, you will run out of replies and will need to wait 24hrs.

1 Like

Thank you for your help. Everything seems to be working now.

PS: I now realised I can edit a reply so no more spamming :slight_smile:

1 Like

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