CloudFlare CDN Toss-Up-optimization settings

Source: Internet
Author: User
Tags browser cache cloudflare cloudflare cdn cloudflare ssl http strict transport security

Recently again in the toss, often visit my blog friends may have appeared on the page 502 error hints, that is tossing CloudFlare CDN unsuccessful tips. In this first thanks to the jar, in his dedication and truth, last night finally successfully use the CloudFlare CDN. Before setting up the CloudFlare CDN 502 Error This problem has not been found, anyway, the jar let me re-notice the ID and try again, a try on the success, so when you use CloudFlare CDN 502 Error Warning, you can try this method- Re-register a CloudFlare account.

Why toss CloudFlare CDN, the reason is very simple, want to hide the real host IP address, but also because the virtual host is located abroad, the acceleration of the blog will be necessary. The CloudFlare CDN function does not need to be introduced in detail, as long as the understanding of what is called CDN can be. Why not use the domestic CDN, well, have a better choice why not to choose better? Perhaps you would say that because of the domestic network environment, the IP of CloudFlare CDN is often inaccessible by the wall. All I can say is that they don't move ladders these days. Users of the Internet are not high-quality readers.

The following is to tell you how I use CloudFlare CDN, the lower part of the content directly copied the jar, who let him in front of me to write the article, make me not only this article will not write, even the article name do not know how to get good.

1. DNS settings:
DNS records inside will be pan-resolution removed (if any), leaving only CloudFlare "cloud" under the protection of A and CNAME resolution (recommended all a resolution, in name is filled with www and @ both), completely hide the site's source IP, It's a little bit of a benefit to anti-DDoS attacks. There are usually 2 DNS assigned IPs, CloudFlare uses anycast and nginx anti-proxy technology, in fact, when CDN accelerates, it automatically assigns the nearest data center, Https:/ You can view the data center that the browser is contacting (the Colo value corresponds to the corresponding data center). Note: The default may also have Mail MX interpretation, if you do not need to use the mailbox, delete directly.

2. Crypto option:
I enabled SSL (with SPDY) Strict (the domain itself has purchased SSL), meaning that the communication between the CloudFlare server and my host also requires SSL encryption, and then I also enabled the HTTP Strict Transport Security ( HSTS), and turn on all the additional options inside. Here to remind you, if your domain has not purchased SSL temporarily do not buy, with CloudFlare SSL test, I feel can also achieve the whole station ssl―― this point who test good please tell me the result.

3. Firewall option:
Security level I used high-grade, do not know the effect of how, in this said, this site does not have any commercial value, really high man do not waste time to D, here thanked.

4. Speed option:
Auto minify Choose gzip compression CSS, JS and HTML three options to reduce the size of web traffic. Rocket loader™, further merger optimization JS code asynchronous loading, I choose off, because I blog is a double column, in the domestic network environment, if the use of this function, always first show the left column and then display the right column, to other people's feelings show very slow. This feature varies from person to person and needs to be tested on its own, so do not enable it if the page loads, after all, is a beta feature.

5. Caching option:
Browser Cache Expiration I chose a one-month validity period. The jar was chosen for one year.

6. Scrapeshield option:
Email address obfuscation enabled to protect the mailbox name appearing on the webpage from being scanned by the robot.

CloudFlare CDN function is very powerful, but how does it effect? As the body in the country, I really did not feel its speed-up effect, and direct access to the virtual host speed is similar to the test tool testing speed has decreased, and there will be some places simply inaccessible. The reason I think is because the domestic network environment and domestic users to visit the blog when the CloudFlare provide CDN nodes are from the United States, and the same distance from the virtual host came to China, so there is no sense of speed on the promotion. I do not know CloudFlare not the first choice from China's nearest Japan, Hong Kong and other nodes, instead ran to the distant United States.

Will I use CloudFlare CDN for a long time? At present, the CloudFlare CDN does not have much impact on domestic visits, but also can realize the functions I mentioned above, and can speed up the access to other parts of the world, and it will be more friendly to the Google search engine, so my answer is yes, unless there is a large area of the domestic inaccessible one day. Jar said that after the use of CloudFlare, the source host can hardly see the site resource consumption, even the flow has saved more than 60%, statistics show that the last 7 days, the total traffic 10.31 GB, cached traffic up to 6.72 GB, blocking 285 harmful threats (mainly from China).

CloudFlare CDN Toss-Up-optimization settings

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: 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.