Speed Up Your Sites with CloudFlare

Another service that we find very effective is the CloudFlare CDN (Content Delivery Network) hosting also from SiteGround. Similarly, CloudFlare caches static content and distributes it to various servers strategically located in 3 continents. For most of our clients whose target market includes audience outside of their country, this proves to be very useful. Because a visitor’s location wouldn’t matter at all, a user’s requested data will be delivered from the nearest server.

Our websites hosted by SiteGround are all equipped with CloudFlare CDN. Assuming you already have the hosting package with this feature, here’s a guide on how we configured CloudFlare with our Joomla and Magento sites.

You need to login to your cPanel and find CloudFlare icon on Domains section.


On the CloudFlare page you can either select the Free Version or CloudFlare Plus. Select the domains in your account that you want CloudFlare activated.


When you click on any of the activate button, you will be asked to provide an email address. Enter a valid one and click proceed to complete the activation.


This should enable your site to load from the nearest location to a visitor.

But here’s the caveat, CloudFlare works for websites accessed with WWW. There are sites that need to be reconfigured and we thought we could include how to do this as well:

First, login to your cPanel and click on the CloudFlare icon under the domains section. Click on Manage button.


CloudFlare Free version users would need to deactivate the service first. CloudFlare Plus on the other hand should not be deactivated.


After a while, activate CloudFlare Free services again for your desired domain. When a pop-up appears, click Yes. This should reconfigure your website to work through www.

However, CloudFlare Plus users can do this by doing simple edits in your .htaccess file. Insert the following lines at the beginning of the file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]

A few more steps for Magento users:

After saving the committed changes, go back to Magento admin and navigate to System > Configuration > and click on Web button from the left panel

Click on the Unsecured set of options and change the Base URL option to http://www.yourdomain.com. Save the changes.

This should run your website with www. the next time you visit the site.

This post is part of a series on methods we implement on our Joomla and Magento sites to boost speed and performance. Read about the other entries here:

Improving Your Joomla Site Performance

Speed Up Your Magento

SuperCacher Options with Varnish