How to bind your “username.github.io” with your own domain?

Step 1: Register a domain, you can choose whichever the service provider you like, I did it on AWS Route53



Step 2: In your “username.github.io” repo, create a “CNAME” in the repo root directory with all in capital letters and without any extensions, open “CNAME”, type in your domain name like “your-subdomain-name.your-registered-domain.com”, save the change, okay that’s all you need to do in your Github repo.



Step 3: Open https://help.github.com/en/articles/setting-up-an-apex-domain, find something like below and copy all four ip addresses:



Step 4: Go to your DNS provider (typically where you registered your domain name), add an “A” record to your domain, put the four ip addresses in the record, save it. Done.

Leave a Reply

Your email address will not be published. Required fields are marked *