Reader-supported tools & guides: when you register via our links, we may earn an affiliate commission at zero extra cost to you. Full Disclosure Live DNS + Verified Codes: November 2026
DNS & Integrations

How to Connect a Namecheap Custom Domain to GitHub Pages (4 A Records + HTTPS)

Hosting a developer portfolio, open-source documentation site, or Astro/Hugo static blog on GitHub Pages for $0/month? Add these exact four A records and one CNAME record in Namecheap Advanced DNS to unlock custom HTTPS.

Last verified: November 15, 2026 · 5 min read

What are the exact Namecheap DNS records for GitHub Pages?

Point your apex domain (@) on Namecheap to GitHub Pages’ four official IPv4 A records (185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153) and add a CNAME record for "www" pointing to <your-username>.github.io.

Official GitHub Pages Custom Domain DNS Records on Namecheap
Record TypeHostValue / TargetTTL
A Record@185.199.108.153Automatic
A Record@185.199.109.153Automatic
A Record@185.199.110.153Automatic
A Record@185.199.111.153Automatic
CNAME Recordwwwyourusername.github.io.Automatic

Grab a Developer .COM ($5.98), .ME ($4.88), or .XYZ ($2.00)

Pair free GitHub Pages hosting with a custom portfolio domain and free lifetime WHOIS privacy.

Claim $5.98 .COM Student/Dev Promo →

How to prevent custom domain takeover & enable Enforce HTTPS

Add a domain verification TXT record under GitHub Account Settings → Pages (_github-pages-challenge-username) before publishing so nobody else can claim your domain if you ever rename a repository.

  1. Verify domain ownership in GitHub User/Org Settings

    Go to GitHub Settings → Pages → Add a domain, then paste the _github-pages-challenge TXT record into Namecheap Advanced DNS.

  2. Delete Namecheap default parking records

    Remove parkingpage.namecheap.com CNAME and default URL Redirect so Let’s Encrypt sees only GitHub IPs.

  3. Commit a CNAME file to your repo root and check Enforce HTTPS

    Enter your custom domain under Repo → Settings → Pages and check "Enforce HTTPS" once DNS check passes (~10 minutes).

Recommended Verified Offer for This Setup

Best Seller $5.98 / 1st yr

Get a .COM Domain for Just $5.98 + Free Lifetime WHOIS Privacy

Register your first .COM domain at Namecheap for $5.98 (up to 60% off standard retail) with free Domain Privacy protection forever and free DNSSEC.

Frequently Asked Questions

Why is the "Enforce HTTPS" checkbox greyed out on GitHub Pages?

99% of the time a leftover Namecheap URL Redirect record or AAAA record is blocking Let’s Encrypt validation. Remove old records, save your custom domain again in GitHub Pages settings, and wait 10 minutes.

Need an Unregistered Domain for This Setup?

Check live DNS availability instantly with our specialized generators.

All 16 Generators →
Tech & Developer Zero Competition Homelab Utility

Homelab Domain Generator

Stop fighting .local mDNS bugs. Generate clean homelab domain names for Proxmox, Jellyfin, Pi-hole, and Cloudflare Tunnels—with live $0.99 & $2 .XYZ availability checks.

Launch Live Generator →
Personal & Creator First-Time Domain Buyers

Portfolio Domain Generator

Exact Name.com already taken? Generate clean developer, UX designer, and freelancer portfolio domains (.COM, .ME, .IO, .XYZ) and verify live availability.

Launch Live Generator →

Compare Extension Pricing & Renewal Rules:

.XYZ ($2.00) → .DEV (Promo w/ THANKFULDOT (~$12.98)) → .ME ($4.88) →

Next Step-by-Step DNS & Email Blueprints