Follow us on Youtube.  | Follow Website !

Search Suggest

Posts

Registration guide - using DNS & CDN of CloudFlare | Fun Learning Web-Sharing knowledge and IT resources

CloudFlare is the world's largest (and paid) free intermediate and CDN DNS service!

Many large websites are trusting CloudFlare's service. For general users, the free services of CloudFlare are really helpful:

  1. Intermediate DNS service: Cloud server name servers (Nameservers) of CloudFlare are always stable and respond very quickly compared to Nameservers system of Hosting & Domain providers themselves.
  2. CDN service – data distribution system – Help to speed up Website for visitors who are far from the server hosting Hosting. It also has an anti-offensive effect DDoS quite effective.
  3. Flexible SSL: when you use the CloudFlare CDN, you can always use their SSL certificate, no need to register for other SSL certificates.

HOW TO REGISTER & USE CLOUDFLARE

Speed ​​up your website with CloudFlare

In cPanel, the SOFTWARE section has CloudFlare for you to register an account and add a domain but it is not much different from direct registration.

So we register directly on CloudFlare.com directly for fast!

Sign up for CloudFlare

Sign up CloudFlare very easy, you go Page Sign Up and enter email & password. Then an email will be sent to you to confirm.

After confirming email, you can login and declare the domain will use CloudFlare!

Add Domain to CloudFlare

To add a domain to CloudFlare we follow the following sequence of steps!

Select Add site as shown below!

We only use the Free service of CloudFlare.

Pro or higher package is very expensive and should only be used for large websites – the number of simultaneous access – many scattered users around the world!

After Confirm – the records (records) will be declared on the name server (Nameservers) of CloudFlare.

If your domain has been pointed to Hosting before, the DNS records will be automatically updated as set up in the previous Nameservers.

If the domain has not been pointed yet, we need to add these Records as how to declare DNS Records at the domain pointing by using the Domain Nameservers of the Domain service in the previous section, reiterating:

  1. Create A record pointing to the IP of Hosting
  2. Create a www CNAME record pointing to the domain
  3. And if you use other services like Email your own domain name, … then add other Records as a guide of the service.

Specifically as shown below!

The default yellow cloud will turn on for A Record and www. CNAME Record – ie we are using the free CDN service of CloudFlare for Website.

Repeat: If you need to register Let's Encrypt SSL for the domain in cPanel then temporarily turn off the yellow cloud (CDN), after successful registration, turn it back on!

You have declared the Domain NameServers with CloudFlare.

Now need to specify for the Domain name to use Nameservers of CloudFlare.

Depending on the time of registration, CloudFlare will provide you with 2 records (NS Records) to declare the domain name server of CloudFlare.

For example, as shown below:

We log into the Domain service, in the NAMESERVERS section we choose Custom DNS and enter 2 records to specify for the Domain using Nameservers of CloudFlare!

Remember to click the Save button to save the information!

Updating the Domain Nameservers information on the DNS system may take several minutes to 24 hours.

Usually for large Domain services, the update takes only up to 1 hour to take effect.

After the update takes effect, in your CloudFlare account, your Website has been marked Active!

So from now on we will use Nameservers of CloudFlare.

And the CDN service can be used or not. We will continue at the end of this Topic!

Use CloudFlare CDN

CDN Service – Data distribution system of CloudFlare is the best free CDN service in the world today, if your website is small, moderate number of visitors (about a few hundred users / day), use this service. very good.

CDN CloudFlare will cache the Website and distribute it throughout the cloud storage system worldwide, when users access the Website, they will be able to download this cache data from the nearest storage location, thus speed Access is very fast and helps reduce the load handling – queries to the server containing your Website.

Currently CloudFlare has opened Datacenter in Vietnam, so if you use their CDN, domestic users will be able to access buffer data from VN or Hong Kong, so the page loading speed is very fast.

As mentioned above, to use the CloudFlare CDN, you just need to Go to the DNS section Turn on the yellow cloud for A record and CNAME record www as shown below:

Other records such as cPanel, Mail … do not need to use CDN, because it only works for the administrator (you) – while slowing the process of manipulating, installing and editing hosting / website.

When should you use CloudFlare CDN Free?

The free CloudFlare CDN is great, but only suitable for small websites, with little visitors.

Because it is free, so on the same Cluster, CloudFlare contains a lot of cached data (Cache) of Free user Website and if the number of hits on any Website, it also leads to overload and they turn on the mechanism. limited access, so downtime very often.

Access from different regions of the world is not equally stable, sometimes users in Vietnam can access the Website, users in Singapore cannot access it.

A downtime error is often reported as a failure of CloudFlare's connection process to the server where your Website is hosted (ie, due to the downgrade of your hosting).

However, this error is often caused by CloudFlare blocking access to reduce the load, but actually not due to hosting.

Downtime has a serious impact on SEO, so we should not enable CloudFlare's CDN with many important or visited websites.

CloudFlare CDN service has a paid plan, but the price is very high compared to other competitors such as CloudFront (Amazon) or KeyCDN, MaxCDN …

So, if your website is big and wants to use CDN so that users around the world can access it faster, use CDN of CloudFront, KeyCDN or MaxCDN.

Note that the CDN of any service is required to use the Domain Name Server of that service.

Use CDN & Plugin to speed up Caching

CDN works on the mechanism of creating caching for the Website (Caching), so when using plugins accelerated by the same mechanism as WProcket, WP Super Cache, W3Total Cache, Litespeed cache … then we have to reconfigure to they do not conflict with each other.

Specifically:

  • The CDN service creates & processes cache on its own servers – independent of the server that hosts the Website.
  • Caching plugins create & handle caches right on the server containing the Website.

In principle, the cache will be created – deleted – updated – recreated appropriately so that when the Website data is updated, the cache is also updated.

So if not properly configured, creating a cache – clearing the cache – updating the cache will conflict between the CDN service & Caching plugin – making the Website work unstable.

Each Caching plugin comes with instructions for proper configuration if you use an external CDN service.

In the Website Acceleration section – we will know in detail about the CDN configuration for the 2 best acceleration plugins currently available, Litespeed cache and Wp-rocket.

Use CloudFlare's Flexible SSL

If we use CloudFlare's CDN, we can enable Flexible SSL certificates for the Website, which is very convenient:

However, compared to Let's Encrypt's free SSL certificate or Namecheap's cheap SSL certificate – Comodo Positive SSL, CloudFlare's Flexible SSL is not as good!

The quality of an SSL certificate is assessed by compatibility with multiple browsers on all computer operating systems and mobile devices.

In this regard, CloudFlare's Flexible SSL is not appreciated.

As with the CDN Free service, Flexible SSL should only be used for less important sites.

Repeat: Flexible SSL of CloudFlare only works on CDN servers, so if you want to use it, you must enable CDN for Website.

Can CloudFlare be used with other SSL?

May!

If you use Let's Encrypt's SSL or purchased SSL somewhere, you can still use it when you enable CDN CloudFlare (as with any other CDN).

However, it should be noted that at the time of activating or renewing SSL, you need to turn off CDN so that the SSL party can verify the real IP address of the hosting server. After successfully activating or renewing SSL, turn on the CDN again!

With CloudFlare, even when CDN is turned on or off – if you want to use external SSL then you go to Crypto – select Full (Strict) mode!

Advanced features of CloudFlare

In addition to the DNS – CDN & SSL sections, the CloudFlare service has many other features, but the efficiency for the Free package is not too high, so we do not spend much time on it.

Post a Comment