GitHub pages and each project is bound to a custom domain name (multiple and top-level domains are supported)

Source: Internet
Author: User

Suppose I purchased the domain name for www.easonjim.com, want to put www.easonjim.com and easonjim.com domain name jump to the following URL Easonjim.github.io.

My account on GitHub is Easonjim, and I've created a new directory for Easonjim.github.io.

Then create a new file named CNAME in this directory with the contents:

Easonjim.comwww.easonjim.com

The next step is to set the resolution address of the domain name as follows:

Just resolve the @ and www to GitHub's IP.

Reference:

https://help.github.com/articles/troubleshooting-custom-domains/

So next, for my individual project, I want to get a homepage, set the project's home page configuration

Reference:

http://chitanda.me/2015/11/03/multiple-git-pages-in-one-github-account/

Just set the following in the settings configuration of the project:

Click "Settings" on the right, page down to the "GitHub pages" section, select "Launch automatic page Generator" > "Continue to Layouts" > "Publish page" Can.

Once done, you can access this, easonjim.github.io/test, where test is the name of the current project.

So the problem is, the above automatically created page is placed in the Gh-pages Branch branch, then if you want to switch to the main branch, the main choice is here Master branch can:

Then the access address is still unchanged, still is easonjim.github.io/test

If you want to change this form, you can only bind your own domain name in the past can be implemented, assuming I will bind the domain name as t.easonjim.com, in the root directory of the project to create a new CNAME file, and write:

T.easonjim.com

You will then find that the domain name you set above is automatically displayed on the pages of GitHub pages:

Next, in the go to the Domain Name resolution Administration page, the t.easonjim.com domain name points to GitHub's IP, as follows:

Finally, you can use t.easonjim.com to access your home page on your custom project.

This feature can refer to Nanyi's project, inspired by this: https://github.com/ruanyf/es6tutorial

GitHub pages and each project is bound to a custom domain name (multiple and top-level domains are supported)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.