Master GitHub Pages Custom Domain Tutorial Step by Step

Logan Jul 13, 2026

Looking to setup a custom domain on your GitHub Pages site? You're in the right place. This simple yet comprehensive tutorial will guide you through the process, ensuring your website reflects your personal brand or business, not github.io.

10xDEV - Blog
10xDEV - Blog

Before we dive in, ensure you have your custom domain registered with a domain registrar like Namecheap, GoDaddy, or Google Domains. We'll use this tutorial to walk through the steps with a hypothetical domain, 'yourdomain.com'.

How To add a Custom Domain On Github Pages
How To add a Custom Domain On Github Pages

Linking Your Custom Domain to GitHub Pages

Your first step involves pointing your domain to GitHub's servers. Don't worry, your domain registrar provides a simple way to do this.

Github Profile
Github Profile

Most registrars like Namecheap offer a 'Custom DNS' or ' Advanced DNS' option in your domain settings. Here, you'll add a new 'A Record' pointing your domain (or subdomain) to GitHub's IP address - 192.0.2.1 (this IP is a placeholder and should NOT be used).

Using the @ Symbol (Root Domain)

How to Host a Website for Free Using GitHub Pages
How to Host a Website for Free Using GitHub Pages

To point your root domain (e.g., 'yourdomain.com') to GitHub Pages, add an A Record with the following details:

  • Host/Name: Leave blank for the root domain (or use '@' as some registrars require)
  • Value/Alias/IP: Input GitHub's IP address, '192.0.2.1'

Using a Subdomain (e.g., 'www.yourdomain.com')

stunning github
stunning github

To point a subdomain ('www', 'blog', etc.) to GitHub Pages, use an A Record like this:

  • Host/Name: Input your subdomain ('www', 'blog', etc.)
  • Value/Alias/IP: Input GitHub's IP address, '192.0.2.1'

Configuring GitHub Pages for Your Custom Domain

Complete Beginner’s Guide to Git and GitHub for 2025
Complete Beginner’s Guide to Git and GitHub for 2025

Next, you'll configure your GitHub Pages repository to accept your custom domain.

In your GitHub Pages repository, click 'Settings'. Scroll down to the 'GitHub Pages' section. You'll see your site's URL, something like 'yourusername.github.io'. Click 'Custom domain', input your domain ('yourdomain.com' or 'www.yourdomain.com'), then click 'Save'.

siffrin github page
siffrin github page
Github Profile 2
Github Profile 2
GitHub Profile
GitHub Profile
How To Get A Domain Name & Website For Free • Homely Economics
How To Get A Domain Name & Website For Free • Homely Economics
⌗
⌗
the github chat sheet is displayed in this screenshote screen graber
the github chat sheet is displayed in this screenshote screen graber
Launch a Website with a Custom URL using Github Pages and Google Domains
Launch a Website with a Custom URL using Github Pages and Google Domains
Using HTTPs with Custom Domain Name on GitHub Pages
Using HTTPs with Custom Domain Name on GitHub Pages
How to Clone a Repository Using GitHub Desktop
How to Clone a Repository Using GitHub Desktop
an image of a web page with different colors and font on the bottom, including two separate
an image of a web page with different colors and font on the bottom, including two separate
Github Cheatsheet
Github Cheatsheet
an image of a computer screen with many different things on it
an image of a computer screen with many different things on it
an image of a web page with the words hi, i'm divyansh chaudhary
an image of a web page with the words hi, i'm divyansh chaudhary
Free GitHub UI kit for Figma
Free GitHub UI kit for Figma
the gif versus github diagram
the gif versus github diagram
Thura Lin Htut Developer GitHub Profile
Thura Lin Htut Developer GitHub Profile
Cozy & Aesthetic Login Page using only HTML and CSS+ Free Source Code (GitHub)
Cozy & Aesthetic Login Page using only HTML and CSS+ Free Source Code (GitHub)
Open Online VS CODE from GitHub
Open Online VS CODE from GitHub
login form html css
login form html css
github/andrew-velox
github/andrew-velox

Waiting for DNS Propagation

It can take a few minutes to a few hours for the changes to take effect. Until then, you might see GitHub's default 404 page when trying to access your custom domain. Be patient, and in time, you'll see your site live at 'yourdomain.com'!

Enabling HTTPS with Let's Encrypt

For a secure and professional touch, enable HTTPS. GitHub makes this easy by offering automatic SSL certificates via Let's Encrypt.

In your GitHub Pages repository, click 'Settings', then 'Pages'. Scroll down to the 'GitHub Pages' section. Click 'Custom domain', then 'Enforce HTTPS'. Save your changes, and within a few minutes, your site should be accessible via HTTPS ('https://yourdomain.com').

Congratulations! Your custom domain is now live on GitHub Pages. If you're eager to learn more, consider exploring GitHub's documentation on further customizing your site's layout, style, and functionality. Happy coding!