Skip to content

Instantly share code, notes, and snippets.

@oliverstech
Created January 18, 2023 15:47
Show Gist options
  • Save oliverstech/e3833470f5f49b3dd3ec7553985bd242 to your computer and use it in GitHub Desktop.
Save oliverstech/e3833470f5f49b3dd3ec7553985bd242 to your computer and use it in GitHub Desktop.
Using a Custom Domain on GitHub
www.yourdomain.com 1 IN CNAME yourgithubuser.github.io.
yourdomain.com. 1 IN A 185.199.108.153
yourdomain.com. 1 IN A 185.199.109.153
yourdomain.com. 1 IN A 185.199.110.153
yourdomain.com. 1 IN A 185.199.111.153

Adding a custom domain to your site

  1. Go to your repositories page settings (Settings > Pages)
  2. Enter your custom domain in the field (yourdomain.com)
  3. Import the below DNS records. (if you're using Cloudflare, you can import the text file to automatically import all DNS records)

CNAME - www.yourdomain.com - yourgithubuser.github.io - Auto TTL One of each of the below too. A records, root of domain (yourdomain.com), auto TTL.

185.199.108.153

185.199.109.153

185.199.110.153

185.199.111.153
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment