How to bind personal domain names for personal blogs deployed in GitHub

Time:2022-4-3

The premise is that you have set up your own personal blog
If you want to build your own personal blog, you can come to my personal blog learning address

Purchase domain name

First of all, if you want to bind the domain name, you need to buy your own domain name. I bought the domain name on Tencent cloud (not advertising)

You can see a series of processes when you search the domain name purchase on Tencent cloud. (Note: you need toReal name authentication

When everything is ready, it’s like this in the figure below
How to bind personal domain names for personal blogs deployed in GitHub

Resolve domain name

The next step is to resolve the domain name. Enter the console and click Add website resolution quickly to see the prompt

How to bind personal domain names for personal blogs deployed in GitHub

So how to get the IP address?

Open window + R and enter CMD. Enter Ping + user name after entering the terminal github. io

How to bind personal domain names for personal blogs deployed in GitHub

(Note: ifThe display ‘ping’ is not an internal or external command, nor is it a runnable program or batch file.Just needOpen the terminal as an administrator

How to bind personal domain names for personal blogs deployed in GitHub

Next, go back to the console to resolve the domain name, and add an a resolution and a CNAME resolution

How to bind personal domain names for personal blogs deployed in GitHub

Add in CNAME file directory

After parsing, add the CNAME file to the source folder in the project directory

Use it first Txt suffix, open the text editor

How to bind personal domain names for personal blogs deployed in GitHub

Enter the personal domain name you just purchased
How to bind personal domain names for personal blogs deployed in GitHub
Save and close after input
How to bind personal domain names for personal blogs deployed in GitHub

The most important step

Enter the GitHub project and click setting

How to bind personal domain names for personal blogs deployed in GitHub

Scroll down in option to findGitHub Pages

Enter the personal domain name you applied for in the custom domain
How to bind personal domain names for personal blogs deployed in GitHub

Finally, enter the personal domain name to link to the personal blog page

How to bind personal domain names for personal blogs deployed in GitHub

Note: enter the original user name + GitHub The IO URL will be directly linked to the newly bound domain name
For example: enter dark-flame-master1 github. IO will jump directly to www.hzblog vip

Reference website