You can configure a custom domain for User, Organization, and Project Pages.
For information on the different types of custom domains, see "About custom domains for GitHub Pages sites."
Creating and committing a CNAME file
To redirect your GitHub Pages site, you must create and commit a CNAME file that contains the custom domain to your repository's root directory. For more information, see "Adding a CNAME file to your repository."
Configuring a custom subdomain with your DNS provider
If your custom domain is a subdomain, you must configure a CNAME record with your DNS provider. For more information, see "Tips for configuring a CNAME record with your DNS provider."
Configuring a custom apex domain with your DNS provider
If your custom domain is an apex domain, you must configure an ALIAS, ANAME, or A records with your DNS provider. For more information, see "Tips for configuring an A record with your DNS provider."