When you have purchased a domain name and server, the next step is to resolve your domain name to your server address. Each domain provider has a slightly different interface, so if you don't understand it, you can use a web translator to find the DNS-related settings.
Domain Resolution#
Taking the namecheap backend as an example, open Advanced DNS in the domain settings, and you will see the location for domain resolution.
- Type refers to the type of domain resolution, generally selecting A record is sufficient, which is commonly known as A type;
- Host means the domain name, generally, we will resolve two types: "www" and "@", so that both types can access your website normally when it is created;
- Value is the server's IP address, just enter it directly.
After filling in the above content, check and save it.
CDN Usage Method#
CDN is a network service that can hide the real IP of the server and accelerate website access speed. The most widely used free CDN service is provided by Cloudflare, commonly known as "CF". Technically skilled webmasters can also build their own CDN for personal use.
You can decide whether to use CF services based on your needs. If you are handling domestic traffic and have purchased a CN2 server, it is not recommended to use CF; you can only resolve directly to the server or use other CDNs. If you, like me, are handling international traffic, you can directly use CF.
Cloudflare Official Website#
Cloudflare Registration#
Registering for CF is very simple; just enter your email and password, then log in to verify your email, and it's done. It is recommended to use Gmail or Proton for the email.
After completing the registration, log in, and on the left, select [Website], then add your domain name.
Scroll down the page, select the free plan shown in the image, and click continue.
Here, enter the name of your domain resolution and server IP, then save and click continue.
Finally, find point 3, copy the name servers. Go to your domain provider to change your domain servers.
After completion, you need to wait for a while, about ten minutes to a few hours, and refresh the page to see that the domain has been added.
In the future, if you change servers or add domain resolutions, you can log in to CF directly.