Tutorial on configuring Baidu Cloud CDN to a website

Source: Internet
Author: User
1. Set NS

 

First, set the domain name's NS resolution to a hundred-degree cloud-accelerated NS for website verification.

 

2. Set domain name resolution

 

To prevent frequent changes in the IP addresses of CDN nodes, we can parse an additional search engine line and set it to non-accelerated.

 

 

 

III. Configuration options

 

You can set acceleration, security, and SEO globally in the configuration options. You can set them according to your actual situation.

 

IV. Custom rules

 

In the free version, you can customize three rules and support wildcard *. Three rules are enough for a personal blog

 

 

I only use two rules here. One backend page is configured globally, and the other is added later. The two rules are shown in the following figure.

 

 

I encountered a pitfall in global configuration, which made me suffer for a long time, that is, the javascript quick loading option. At the beginning, I chose automatic identification, after I configured all of them, I rushed to the website to verify the effect, and found that all the javascript effects of the website were invalid:

 

1. Code highlighting is not displayed

 

2. 3D labels do not rotate

 

3. The "share with appreciation" button on the article page is invalid.

 

4. The background login button is invalid.

 

I thought it was the reason for caching, so I started the real-time synchronization mode of Baidu Cloud and disabled cloud acceleration. The results were the same for various Cache clearing methods. Finally, I carefully studied the various options of the rule and thought it was possible that javascript was overly compressed because I already had the Autoptimize plug-in. After the plug-in was closed, the test was finally normal.

 

 

So far, the CDN acceleration settings have been completed, and the blog speed has indeed increased a lot.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.