Hexo+yilia theme website binding personalized domain name


In the last article, we have successfully deployed our own blog website, and the initialized website seems to lack some content (high-end and high-end settings). Next, we will further improve our blog site (Meng Fan Sheng You).

Bind a personalized domain name

When you open the fixed domain name set by github, do you feel extremely low? The main reason is that the domain name given to you by github is destined to be like this when you register your user name, so the top priority of deploying the website is to set up a domain name with our own personality.

buy a domain name

There are many domestic domain name service providers, such as Ali’s Wanwang, Tencent Cloud, Xinwang, Western Digital, etc. Since I registered the domain name at Wanwang, I will take Wanwang as an example below (other service providers have the same process ).


After purchasing your favorite domain name in Wanwang, enter the management console of Alibaba Cloud –> Domain Name and Website –> Domain Name, and you can see the purchased domain name. At this time, the status of the domain name is not verified by real name, and then Real-name authentication (requires real-name authentication, otherwise you will not be able to access it), usually takes about 2 hours. After the authentication is completed, just wait for it to pass slowly. However, you can still perform the following operations before the authentication is successful.


First get the IP address of your github’s second-level domain name, and directly ping your blog (that is, “username.github.io”) in cmd under windows to get the IP address:

Hexo+yilia theme website binding personalized domain name

My ip is

Next, point the purchased domain name to the second-level domain name of github through DNS domain name resolution: username.github.io

Enter the management console of Alibaba Cloud, click on the left side menu bar –> domain name, and then you can see the domain name you purchased under all domain names, enter the resolution settings of the domain name, click Add record, and then add two records. , a CNAME record, and an A record. The CNAME record points to your username.github.io, and the A record points to the ip address you queried. After completing the resolution list, the following two records will appear:

Hexo+yilia theme website binding personalized domain name

At this time, half of the success is achieved. Don’t worry! ! !


Under the Hexo project you created, add a CNAME file, find the project you created, and then enter the source folder (such as my Blog/source), create a CNAME file without a suffix, open it with a text editor, and enter it Add the domain name you purchased, such as my mengnn.cn. Be sure to remember hexo d to submit the project to github after adding

On github, open the (Settings) settings of the username.github.io project, then fill in the purchased domain name in the Custom domain setting of GitHub Pages, and then click save to confirm. for example:

Hexo+yilia theme website binding personalized domain name

At this point, all configurations are completed, and you can directly access your new domain name (provided that the authentication has been completed). With her own unique and personalized domain name, Ma Ma will never be afraid of not being able to find us again! ! !