Custom Domain & DNS Setup
These instructions explain what DNS records to add at your domain registrar to point your
custom domain (e.g. engrams.sh) to the GitHub Pages deployment.
1. Enable GitHub Pages in the repository
- Go to your GitHub repository → Settings → Pages.
- Under Build and deployment, set source to GitHub Actions.
- Push to
main— the workflow will build and deploy automatically.
2. Set the custom domain in GitHub
- In Settings → Pages → Custom domain, enter your domain (e.g.
engrams.sh). - Click Save. GitHub will attempt to verify the domain.
- Enable Enforce HTTPS once the SSL certificate is provisioned (can take up to 24 hours).
CNAME file containing engrams.sh
is already included in docs/public/CNAME and will be copied to the build output
automatically. This prevents GitHub from clearing your custom domain after each deploy.
3. Add DNS records at your registrar
Log in to your domain registrar (Namecheap, Cloudflare, GoDaddy, etc.) and add the following records:
Option A — Apex domain (engrams.sh)
Add four A records pointing to GitHub's IP addresses:
| Type | Host / Name | Value | TTL |
|---|---|---|---|
| A | @ | 185.199.108.153 | 3600 |
| A | @ | 185.199.109.153 | 3600 |
| A | @ | 185.199.110.153 | 3600 |
| A | @ | 185.199.111.153 | 3600 |
Also add an AAAA record for IPv6 support (optional but recommended):
| Type | Host / Name | Value | TTL |
|---|---|---|---|
| AAAA | @ | 2606:50c0:8000::153 | 3600 |
| AAAA | @ | 2606:50c0:8001::153 | 3600 |
| AAAA | @ | 2606:50c0:8002::153 | 3600 |
| AAAA | @ | 2606:50c0:8003::153 | 3600 |
Option B — www subdomain (www.engrams.sh)
Add a CNAME record:
| Type | Host / Name | Value | TTL |
|---|---|---|---|
| CNAME | www | <your-github-username>.github.io | 3600 |
<your-github-username> with your actual
GitHub username (e.g. stevebrownlee.github.io).
Option C — docs subdomain (docs.engrams.sh)
If you want to host docs at a subdomain instead of the apex, add only a CNAME:
| Type | Host / Name | Value | TTL |
|---|---|---|---|
| CNAME | docs | <your-github-username>.github.io | 3600 |
And update docs/public/CNAME to contain docs.engrams.sh.
4. Verify propagation
DNS changes can take up to 48 hours to propagate globally, though they usually take effect within minutes. Check using:
# Check A records
dig engrams.sh A +short
# Check CNAME
dig www.engrams.sh CNAME +short
# Online tool
https://www.whatsmydns.net/#A/engrams.sh 5. Cloudflare users
If your domain is behind Cloudflare, set the A records with the proxy status turned OFF (grey cloud, DNS only). Cloudflare proxying can interfere with GitHub Pages' TLS certificate issuance.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Domain shows GitHub 404 | Pages not yet deployed or custom domain not saved | Re-check Settings → Pages and trigger a manual deploy |
| SSL certificate not issued | DNS not yet propagated | Wait up to 24 h; check DNS propagation with dig |
| Custom domain resets after deploy | Missing CNAME file in build output | Ensure docs/public/CNAME exists and contains your domain |
| Mixed-content warnings | HTTP assets on HTTPS page | Enable "Enforce HTTPS" in Settings → Pages |