Github pages static web site Building

Source: Internet
Author: User
Tags url forwarding

Create a warehouse

Slightly. See the GitHub tutorial for more details.

Warehouse Property settings

Find the GitHub pages item. Click Auto-Generate, follow the prompts, and you will get the Gh-pages branch of the project.

The publishing site was successful with the address http://chuchus9293.github.io/web2.

The index.html page in the directory is the default page for the site.

Publishing success

Of course, you can make your own HTML website, upload code via GitHub client is very convenient. Index.html is still the default page.

Domain binding to GitHub Pagegithub project settings

Add a CNAME file under the repository root, without the suffix name, which is your domain name and does not need to add the http://prefix.
If the CNAME is www.example.com then example.com will be redirected to Www.example.com,www.example.com is still itself.

Note Only one domain name can be added to the CNAME.

Once created, you can see the post address change in the project settings and no longer have the GitHub word.

DNS resolution settings

Ccsyi.cn is a top-level domain.
Www.ccsyi.cn is a level two domain name.
You can set a record for a top-level domain, set a CNAME for a level two domain name, point to Username.github.io (Gihub recommended, you can use CDN).

The following is the process of setting up a record.

Get the GitHub pages server IP.

In the peanut Shell domain name Resolution service, select WWW to create a record. Synchronized to DNS servers around the world within 24 hours.

Related concepts

A record: The IP point of the Web server
A (address) record is the IP address record used to specify the hostname (or domain name).
Description: A user can point a Web server under that domain name to its own Web server. You can also set your own domain name level two domain name.
is said: Through a record, you can set their own different domain names to go to different IP up! Such as:
www.linuxpig.com go to IP 1.1.1.1
ftp.linuxpig.com go to IP 1.1.1.2
mail.linuxpig.com go to IP 1.1.1.3

CNAME (Canonical name) record, (alias from one domain name to another) is usually referred to as the alias point
You can transfer the different domain names you have registered to a primary domain name.
Unlike a record, a CNAME alias record can be set up as a description of a domain name and not necessarily an IP address.
For example: linuxdog.com with a cname to point to linuxpig.com

URL (Uniform Resource Locator) Forwarding: URL forwarding
Function: If you do not have a separate server (that is, you do not have a separate IP address) or you have a domain B, you want to access a domain A to access the content of the B domain, then you can be implemented by URL forwarding.
URL forwarding can be forwarded to a directory, or even to a file. The CNAME is not, which is the main difference between URL forwarding and CNAME.
For example:
URL forwarding can forward sina.com.cn to linuxpig.com/sina/, and the corresponding CNAME can only forward sina.com.cn to linuxpig.com.


The full TTL value is "Time to live", which simply means that DNS records cache time on the DNS server.

Github pages static web site Building

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.