Wenura
Wenura

Reputation: 113

Add Custom Domains in GitHub Pages

How to change http://user.github.io/repo to http://customdomain.com/myrepo in GitHub Pages?

I tried going through the documentation but it didn't talk about this case.

Upvotes: 1

Views: 1138

Answers (1)

Panquesito7
Panquesito7

Reputation: 386

AFAIK, to have a customized domain name, you have to create a file named CNAME in the root directory of your GitHub repository.

The file content should be something like this (this is just an example):

my-website.com

Instead of using https://user.github.io/<repo-name>, it will now redirect to my-website.com.
You still have to make a few other changes for this to work. Check out the GitHub Docs on this topic.

Upvotes: 3

Related Questions