Skip to main content

DNS Records

Common record types

TypeUse caseExample
AIPv4 addressapi1.2.3.4
AAAAIPv6 addressapi2606::1
CNAMEAlias to another hostnamedocstunght.github.io
MXMail exchange@mail.example.com
TXTVerification, SPF, DKIM@v=spf1 include:...

GitHub Pages setup

Type Name Content Proxy
CNAME docs tunght.github.io DNS only (grey cloud)
Custom domain on GitHub Pages

GitHub Pages requires the DNS record to be unproxied (grey cloud) when using a CNAME. Proxying breaks the SSL certificate validation flow.

After pointing DNS, go to your repository → Settings → Pages → Custom domain and enter docs.huynhthientung.com.

SPF / DKIM / DMARC

TXT @ v=spf1 include:_spf.google.com ~all
TXT docs v=DMARC1; p=quarantine; rua=mailto:dmarc@huynhthientung.com

Terraform (via Cloudflare provider)

resource "cloudflare_record" "docs_cname" {
zone_id = var.cloudflare_zone_id
name = "docs"
type = "CNAME"
value = "tunght.github.io"
proxied = false
ttl = 1 # auto when proxied=false
}