by Nidin Shah

This walkthrough explains how to replace the default GitHub Pages domain with a custom domain name.

The website was initially hosted using the default GitHub Pages domain:

nidinshah.github.io

and later upgraded to a custom domain:

nidinshah.com

At the same time, the original GitHub domain is still accessible and acts as a sub-domain that redirects and overlaps with the main custom domain.

To achieve this, a custom domain must first be purchased from a third-party domain provider. Recommended providers include:

For this project, Hostinger was selected due to its pricing deal and domain availability for nidinshah.com

GitHub Configuration

From the GitHub side, navigate to the repository that will use the custom domain.

Go to:

Repository → Settings → Pages

Inside the Pages section:

GitHub Pages will automatically attempt to configure the domain once the DNS records from the domain provider are correctly configured.