You can customize the domain name of your GitHub Pages site.
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.
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.
The type of pages site you're using determines how your site redirects custom domains.
Before setting up your custom domain with your DNS provider you need to add a custom domain to your GitHub Pages site on GitHub.
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
To set up an apex domain, such as
example.com, you must configure an
A record with your DNS provider.
To set up a
www subdomain, such as
www.example.com you must configure a
CNAME record with your DNS provider.
You can set up a custom subdomain, such as
blog.example.com, by creating a
CNAME record through your DNS provider.