In previous installtions (building your Own Web site series), we tried to build a site on our computer using WordPress and posted it to the public Internet through CPolar’s data tunnel through a secondary subdomain reserved by CPolar. Make it a truly accessible and meaningful website. Although we successfully launched our website, there is a small problem, that is, the domain name of this website is not defined for us, so our website has some flaws. Can this problem be solved? The answer, of course, is yes. Today, we will introduce how to make our own sites have custom domain names.

As the domain name is the paid resources of the Internet, we need to purchase a favorite domain name from the domain name provider (Ali Cloud, Tencent Cloud, Sina, etc.) first. Fortunately, Internet cloud services have begun to take shape, the price of domain name is now very cheap. In this article, we assume that we have purchased the domain name bestExpresser.com and intend to point this domain name to the WordPress website of the local computer. The specific operation method is as follows:

First, keep your custom domain name on the CPolar server. To do this, we need to log in to CPolar’s official website, log in to CPolar with our own account and go to the dashboard screen. On the left side of the Dashboard screen, click the “Reserve” button and select “Reserve custom domain name”.

In the preserve custom domain name, we need to fill in some basic information, such as the Region and Description fields. In this case, the “Region” is “United States”, the domain name is “dev.bestExpresser.com”, and the “Description” is “test”. Note that the “domain name” and “description” can be customized. This is just for your convenience, and is defined as the content related to the example.

After filling in all the contents, you can click the “Reserve” button on the right, and the CPOLAR server will reserve the domain name for you and generate the CORRESPONDING CNAME address of the domain name.

Then we have to go back to the domain name provider’s website and log in to the Settings interface of the domain name we have purchased (namely the console of Aliyun). Because we are in Ali cloud to buy the domain name, so ali cloud as an example. After entering the console of Ali Cloud, add a cname record under the domain name bestExpresser.com to associate the domain name we purchased with the domain name reserved by CPolar.

After clicking “Add Record”, a new interface will appear, in which there are many fields to be filled and we need to fill in the fields for association. The specific fields are shown below.

After filling in the preceding information, you can click OK in the lower right corner and wait 10 minutes for the server to parse the entered associated domain name information. After the domain name is resolved, you can see the following display.

In order to test whether Ali Cloud can find the Cname address given by CPolar, we can open cPolar locally and input “ping dev.bestexpresser.com” command. As long as the cPolar client displays the following information, It proves that the domain name we buy in Ali Cloud has been associated with the Cname given by CPolar.

In this step, the custom domain name is associated with the Cname address given by CPolar, and we can use the reserved custom domain name to access the web site on the local computer. To prove this, we can run the command “cpolar http-hostname =dev.bestexpresser.com 80” in the cpolar foreground, as long as the following display, it indicates that our website can be accessed by custom domain name.

We can also open a browser and actually see what our site looks like

At this point, our own web site can be accessed through a custom domain name. While this is a welcome step forward, we will not stop striving for perfection. At this point, the web site with a custom domain name has not configured the domain name into CPolar. Therefore, we also need to set up CPolar accordingly, so that it can start automatically when starting up, and run stably in the background, so that our website can be stably online. This part of the content, we will continue to explain in detail in the next article. If you have any questions about the use of CPolar, please feel free to contact us and we will provide you with our best assistance.