I'm confused why CNAME file is also needed in my github pages repository? Why CNAME needs to be done twice at my domain provider and github pages?
How the things works together?
When a http request comes in, saying the request is for mygithub.mypage.com
, github has to know on whose behalf this request is for, so whose page it has to deliver.
This is what the setting at github is for.
To be exact, what github's server sees is a http request like
GET / HTTP/1.1
Hostname: mygithub.mypage.com
There is no notion about mypage.github.io
. They could do a DNS query to find out where mygithub.mypage.com
points to, but they chose to use this version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With