preface

A few days ago, I used hexo to set up a static blog on GitHub in my spare time. Since it is a personal blog, of course, I will use my own domain name.

step-1

First you have to build a blog like xxx. github. IO, [Hexo tutorial].

step-2

After your blog can be visited, go to Ali cloud, Tencent cloud and other websites to register a domain name.

step-3

Get the IP address of the blog

This step is mainly for resolving the domain name. If you do not obtain the IP address, step4 resolve the type A

Clone your repository xxx.github. IO

Second: git input ping www.xxx.github.io to get the IP as shown below:

step-4

And so on domain name review, and I related to come. The following uses ali Cloud registered domain name as an example. Enter ali Cloud management console – Domain name and website – cloud DNS resolution, enter domain name resolution Settings, click Novice guidance, fill the OBTAINED IP address in the column of record value, click OK. The parse list should appear after filling in:

Wait 20 minutes or so

step-5

Create a CNAME file (without suffix) under the source file of the hexo project and write the purchased domain name in it, for example:

step-6

Finally, go to your xxx.github. IO Settings and fill in your domain name

Then the new domain name is ok and can be accessed.