If you bought a flashy GoDaddy domain and now want your static site hosted on GitHub Pages to wear it like a crown this tutorial is for you. It covers the DNS and domain setup steps you need to point GoDaddy to GitHub Pages, add a CNAME, create A records, and get HTTPS working for your custom domain. Yes it takes a little patience while certificates provision, but it beats gifting your visitors an ugly username.github.io address.
Go to your repository settings and enable GitHub Pages from the branch or folder you are using for deployment. For user and organization pages the site will normally be at username.github.io. For project pages the repo name helps form the URL. Either create a file called CNAME
at the repository root with a single line that contains your custom domain or enter the same domain in the Pages settings. This tells GitHub which custom domain belongs to the site.
User and org sites do not include the repo name in the URL, while project pages usually do. The CNAME file method works in both cases. If you need the www host to point to your project page the CNAME should point to username.github.io or to the full repo domain if required.
Open the GoDaddy DNS panel for the domain and add the following records for the apex root domain. Use all four A records to avoid regional failures and to match what GitHub Pages expects.
A 185.199.108.153
A 185.199.109.153
A 185.199.110.153
A 185.199.111.153
Then add a CNAME record for the www
host that points to your GitHub Pages address such as username.github.io
. This makes www resolve to your static site deployment handled by GitHub Pages.
Return to the GitHub Pages settings and enable HTTPS for the custom domain. GitHub will provision a certificate for your domain automatically. This can take minutes or occasionally hours depending on DNS propagation and certificate issuance. Keep refreshing the Pages settings page to see the status.
Try visiting both the apex domain and the www host in a browser. If the root domain does not redirect to www and you prefer visitors to see the www address you can use GoDaddy forwarding to route root traffic to the www host so the visible address matches the HTTPS certificate. Make sure the certificate status in GitHub Pages shows as active before you consider it done.
There you go. With the right A records, a CNAME, and a little patience for HTTPS provisioning your GoDaddy domain will serve your GitHub Pages static site like a pro. Now go enjoy your custom domain and pretend it was easy all along.
I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!
This is a dedicated watch page for a single video.