Search This Blog

Wednesday, 31 May 2017

How to Implement Self-Hosted CDN for Site Speed

advantages-self-hosted-cdn

What Exactly is a CDN?

In simple terms, a Content Delivery Network ( CDN ) is meant to distribute your static content to your users from the nearest possible data center to their geographic location. This makes loading the heavy stuff quicker because it is retrieved from the nearest place. It keeps the data’s travel time to a minimum.
Other effects of CDN is that it lowers down your server’s bandwidth usage because you’re feeding a lot of your static content straight from the CDN’s servers. You are also lowering down the processing memory being used by your server/s because the static content is processed and fed through your CDN.

How to Set-up your Self-Hosted CDN to know from the below steps


First you need to Installing of the W3 Total Cache Plugin to your WordPress site
Login to your WordPress administration dashboard
Click Plugin -> Add New and Browse to W3 Total Cache Plugin
Click the Install Now button and Activate it
Then Follow the below Steps after Activate your plugin

Step 1: Go to the W3 Total Cache Plugin and click the setting option, then click the CDN feature on the General Settings section Then Check the Enable Option and Choose the CDN type was Generic Mirror
1
Step 2: Next go to your W3 Total Cache CDN settings, here is a screenshot of what option you need to check it
2
Step 3: Change your CDN hostname to your self-hosted CDN’s address.
3
Step 4: Login to your website’s cPanel and go to the subdomains section
4
Step 5: Fill up the Create Subdomain form with whatever you want to name your CDN’s subdomain.
5
Step 6: Make sure that you assign the CDN subdomain to your public_html folder so that it will function as a Generic Mirror6
Step 7: Go to your cPanel’s Advanced DNS Zone Editor
7
Step 8: Edit the CNAME of the two new subdomains that you created. Click the edit button
8
Step 9: Change the Type to CNAME and then put your domain name in the CNAME, thus completing the Generic Mirror settings
9
Step 10: Next, go to your W3 Total Cache’s CDN settings and click on Modify Attachment URLS at the topmost part
10.jpg
Step 11: Modify the Attachment URL to your subdomain and click on the Start button
11

Wait for it to load. Close the window, You have now completed your new self-hosted CDN!
From now on, your website should be loading your static files from your subdomain. This will help unclog your pipeline from users siphoning all those static files from your main DNS.



Thank You…….!

No comments:

Post a Comment