Today to teach you to deploy a belongs to their first static website, because here with the help of small program cloud development of static server resources, so you can easily realize the deployment of their website, deployment can be finished in the computer browser, mobile phone browser, wechat public number inside the display.

As usual, look at the renderings first

For simplicity, LET me write the simplest HTML static web pageThen deploy this page to the cloud development static website on wechat to visit the effect is as followsCheck it out on your mobile browserThis means that our site can be accessed from anywhere. Here’s how to quickly deploy a website of your own.

First, open cloud development

Here open cloud development we use small program developer tools to achieve rapid opening.

1-1, register the applet

Here I will not say more, only registered small program appID can open cloud developmentAfter we register the applet, we can get the APPID, as shown in the picture above

1-2, create a small program project

The creation of small program projects, and I’m not going to talk about that much here, I’ve talked about it many times before in the small program foundation course.Small Program Basic Learning It is important to use our own appID and not a test number when creating a small program project.If you originally created with a test APPID, you can also replace it with the appID of your own applet as shown in the figure above.

1-3. Open cloud development

Here the opening of cloud development, I will not do too much to explain, I cloud development course also talked about many times. You can check it outJust click the cloud development button in developer tools and follow the instructions step by step to quickly open the cloud development.

Two, open static website function

We above the cloud development and opening good, you can quickly open static website here.After clicking, click open directlyThere’s a condition for this openingWe have to change the way we pay for our mini programs as required, and change our payment method to pay by volume.At this time our static website function opened successfully.The following figure shows the successful opening.At this point, we can upload our developed static web page to the website for others to visit.

Three, deploy the website

Our static HTML is as followsClick Upload File to upload our index.html file to the static web siteThat means the upload is successful.

Visit our website

After successfully deploying the web page above, we can access it through the default url created for us by cloud development.Click on the details shown above to get the url below to visit our websiteThe url shown in the arrow above is the url to visit our website.If your HTML is named index, we use the domain name assigned to us by cloud development to access our website directly.Study-gas4x-1258760189.tcloudbaseapp.com’s cloud development for my website domain name assignment, the user can directly through the domain name visit our website. In fact, here we can successfully deploy our own website, is nothing more than your web page write better than stone brother.

But some students think the official domain name is too long to remember, and want to use their own domain name. So how do we configure our own domain name?

4. Configure the domain name (select see)

In fact, the first 3 steps can be successfully deployed their own website, if you have their own domain name, and also successfully filed, then follow stone brother to learn this section. If you don’t have your own domain name, then you have to register your own domain name and put it on record. So this is going to be an elective.

4-1. Add your own domain name to your website configuration

If I click here to add domain name, and then add their own record domain name.But if we want HTTPS for secure access, we have to configure our own SSL certificate.After that, we can directly apply for a free certificate here. The validity period of the free certificate is one year, after one year, we can apply for a new certificate, so the free certificate here is enough.Fill in your domain name and other information truthfully.After submitting the data, we need to verify our domain name here, and the authentication mode is DNSIf you don’t want to learn about DNS authentication, you need to configure the resolution value for your domain name.After configuration, you can click verify to verify firstAfter the verification succeeds, you can see the followingThe Cloud development console will also show that it is deployed, and we will wait patiently for deployment.If the startup is successful, the following identifier is displayedAlthough we have started successfully, if we want to access our own cloud development static website through our own domain name, we still need to configure CNAME redirection, that is, when accessing our domain name, we have to redirect to the domain name assigned to us by cloud development.It is a little obscure to understand here, and the official document is not clear, I also tried many times to know that this is the configuration. Once this is configured, we can access the website directly through our own domain name.You can also go to visit the next stone elder brother’s cloud development static site to try.

Here is the end of our website deployment, I will use Vue to write some cool website, and then deployed to the line for everyone to watch. All right, that’s all for today. Stone is going to have lunch.