You can customize the domain name of your GitHub Pages site.

Quick start: Setting up a custom domain

There are three main stages to setting up a custom domain for your GitHub Pages site: choosing your custom domain and registering it with a DNS provider, adding your custom domain to your GitHub Pages site on GitHub, and configuring your domain with your DNS provider.

About supported custom domains

If you're setting up a custom domain for your GitHub Pages site, choose a supported custom domain for the easiest setup and more support. GitHub Pages is designed to work with two types of custom domains: apex domains and subdomains.

Custom domain redirects for GitHub Pages sites

The type of pages site you're using determines how your site redirects custom domains.

Adding or removing a custom domain for your GitHub Pages site

Before setting up your custom domain with your DNS provider you need to add a custom domain to your GitHub Pages site on GitHub.

Setting up an apex domain and www subdomain

You can set up an apex domain and a www subdomain through your DNS provider and GitHub Pages' servers will automatically create redirects between them. For example, your site can be found at www.example.com or example.com.

Setting up an apex domain

To set up an apex domain, such as example.com, you must configure an ALIAS, ANAME, or A record with your DNS provider.

Setting up a www subdomain

To set up a www subdomain, such as www.example.com you must configure a CNAME record with your DNS provider.

Setting up a custom subdomain

You can set up a custom subdomain, such as blog.example.com, by creating a CNAME record through your DNS provider.

Troubleshooting custom domains

If your GitHub Pages site isn't loading at your custom domain, you may have an error in your GitHub repository setup or your DNS configuration.