Hosting & Domains

How to Connect a Custom Domain to GitHub, Vercel & Netlify

H
HTMLtoPHP TeamMay 19, 2026 โ€ข 8 min read

Modern cloud deployment platforms like GitHub Pages, Vercel, and Netlify have completely revolutionized web hosting. You can push code to a Git repository and have a global, CDN-backed static website live in secondsโ€”with zero hosting fees.

However, sharing a default subdomain like your-project.vercel.app or username.github.io does not look professional for a client project, personal portfolio, or business launch. You want your own custom brand domain (like yourbrand.com). In this step-by-step guide, we will show you exactly how to configure your DNS records and attach a custom domain to all three top hosting platforms with free automated SSL certificates.

"Deploying to modern edge networks gives you 100/100 performance scores. Attaching a custom domain gives your project instant credibility."


1. Connecting a Custom Domain to GitHub Pages

  1. In your GitHub repository, navigate to Settings → Pages.
  2. Under Custom domain, enter your domain name (e.g. yourdomain.com) and click Save. (This commits a CNAME file to the root of your repo).
  3. Log into your DNS provider (Cloudflare, Namecheap, GoDaddy) and add the four official GitHub Pages A Records at the root (@):
    185.199.108.153
    185.199.109.153
    185.199.110.153
    185.199.111.153
  4. Add a CNAME record for www pointing to YOUR_USERNAME.github.io.
  5. Back in GitHub Settings, check the box for Enforce HTTPS.

2. Connecting a Custom Domain to Vercel

  1. Open your Vercel Project dashboard → Settings → Domains.
  2. Type your domain name (e.g. yourdomain.com) and click Add.
  3. Vercel will automatically display the required DNS records:
    • A Record: Name @ → Value 76.76.21.21
    • CNAME Record: Name www → Value cname.vercel-dns.com
  4. Add those records in your DNS manager. Vercel will auto-detect the changes, issue an SSL certificate with Let's Encrypt, and switch to "Valid Configuration" within 60 seconds.

3. Connecting a Custom Domain to Netlify

  1. Go to your Netlify Site dashboard → Domain management → Add a domain.
  2. Enter your domain name and click Verify → Add domain.
  3. Add the following DNS records in your domain registrar:
    • A Record: Name @ → Value 75.2.60.5
    • CNAME Record: Name www → Value YOUR_SITE_NAME.netlify.app
  4. Netlify will automatically provision a free wildcard SSL certificate.

4. Apex Domain vs. WWW Subdomain Routing

Always configure both versions of your domain: the apex root (yourdomain.com) and the www subdomain (www.yourdomain.com). Choose one as your canonical primary domain and configure your platform to automatically 301 redirect the other. This prevents Google from indexing two duplicate copies of your content.


5. Verifying DNS & SSL Issuance

๐Ÿ”
Verify Your Setup

After adding DNS records, test your live certificate status and edge headers using our free SSL Checker and HTTP Headers Checker.


Frequently Asked Questions

Why is my custom domain showing "Invalid Configuration"?
DNS records take anywhere from 5 minutes to a few hours to propagate globally. Make sure you don't have conflicting old A records from a previous host still active in your DNS table.
Do I have to pay extra for an SSL certificate?
No! GitHub Pages, Vercel, Netlify, and Cloudflare all issue and automatically renew free Let's Encrypt SSL certificates for all custom domains connected to their platforms.

Conclusion

Connecting your custom domain to modern hosting platforms combines the zero-maintenance speed of edge deployments with your own custom brand identity.

Audit your server network and domain routing.

Verify your server IP, test SSL certificates, and debug response headers for free.

Explore Network Hub โ†’

More Guides (20)

View All โ†’
โœ‰๏ธ
Email & Productivity

How to Set Up Custom Domain Email in Outlook, Gmail & iPhone

8 min read
โ˜๏ธ
Networking & DNS

How to Set Up Cloudflare Free CDN & DNS: Speed, SSL & Protection

8 min read
๐Ÿ“ฌ
Security & Authentication

Why Are My Emails Going to Spam? How to Fix SPF, DKIM & DMARC

8 min read
๐Ÿ”“
Security & Authentication

How to Fix "Not Secure" Warning & SSL Mixed Content Errors

7 min read
๐Ÿš€
Networking & DNSReading

How to Connect a Custom Domain to GitHub Pages, Vercel & Netlify

8 min read
๐ŸŒ
Networking & DNS

The Ultimate Guide to DNS Records: A, AAAA, CNAME, MX, TXT & PTR

8 min read
๐Ÿ“ก
Networking & DNS

What Is an IP Address? Public vs. Private IPv4, IPv6 & Subnetting

7 min read
๐Ÿšฆ
Networking & DNS

HTTP Status Codes Explained: 200, 301, 404, 500 & 502 Bad Gateway

7 min read
๐Ÿ›ก๏ธ
Security & Authentication

JSON Web Tokens (JWT) Demystified: Header, Payload & Signatures

8 min read
โšก
Web Performance & SEO

Mastering Core Web Vitals in 2026: Optimize LCP, INP & CLS for SEO

8 min read
๐Ÿ”’
Security & Authentication

Is Your Website Actually Secure? 3 Network Checks You Must Run

6 min read
๐ŸŽจ
Developer & Data Tools

The CSS Color Nightmare: How to Manage HEX, RGB, and Gradients

6 min read
๐Ÿงน
Developer & Data Tools

Data Cleaning Guide: How to Clean JSON, CSV & Text Like a Pro

7 min read
๐Ÿ”—
Content & Social

Stop Sharing Ugly Links: The Complete Guide to Open Graph & Twitter Cards

4 min read
๐Ÿ“‰
Web Performance & SEO

Why You Must Minify HTML, CSS, and JS Before Every Deployment

4 min read
๐Ÿ–ผ๏ธ
Web Performance & SEO

Stop Using PNGs for Everything: The Developer Guide to Image Formats

5 min read
๐Ÿš€
Web Performance & SEO

5 Essential Steps to Optimize Your Website Before Launch

4 min read
๐ŸŽฏ
Web Performance & SEO

Why Your Website is Invisible on Google: The Ultimate Meta Tag Checklist

5 min read
๐Ÿ”—
Developer & Data Tools

Stop Breaking Your Links: The Developer Guide to URL Encoding and Base64

5 min read
๐Ÿ“
Content & Social

Stop Writing HTML by Hand: The Ultimate Guide to Markdown and Text Tools

5 min read
โšก

Explore 70+ Free Tools

Instant client-side developer, networking, SEO & formatting utilities.

Browse All Tools โ†’