Fully-managed Hosting for Ecommerce


Build effortless AWS environments with AutoPilot.

We believe in simplicity, innovation, and transforming the way you manage AWS environments for your e-commerce platforms. With just a few clicks, AutoPilot delivers a robust AWS environment tailored specifically to your needs.

Mar 5


The Benefits of a CDN like CloudFlare for Magento websites

If you own a Magento store, chances are that it’s hosted out of one data center. That holds true whether you’re on a shared hosting account, VPS, dedicated server, or even a cloud hosting account. This can be a limiting factor when considering everything from loading speeds, to security, to your ability to handle peak concurrent traffic.

A Content Delivery Network (CDN) helps to distribute some of that traffic load to other data centers, usually geographically closer to the end user, while adding other beneficial features to your hosting architecture. There are many powerful CDN’s like Akamai, Fastly, KeyCDN, MaxCDN, and MetaCDN, to name a few. At JetRails, our clients most often choose Cloudflare. With that in mind, we’d put together some information on the most important features that a CDN will provide you with, including some functionality that’s more specific to Cloudflare’s service:

Content Delivery

Cloudflare uses 150+ data centers in its network. This means that static content from your website, such as images, can be cached on servers around the globe. Rather than loading files from your primary hosting account, you’re able to spread your traffic load across Cloudflare’s network.

You can also see a natural improvement in loading speeds since it will take fewer hops across the internet to view your website. Cloudflare can even intelligently plan hops based upon the fastest route across the internet.  It takes into account any active congestion, latency, or slowdowns along the world wide web.

This also leads to better security, since hackers are less likely to reach the origin server. Additionally, if you experience a Denial of Service (DDoS) attack, it will be a lot harder for the perpetrators to overwhelm your hosting platform with traffic since your traffic will be better dispersed across Cloudfare’s network.

If you’re using a metered hosting account, such as a cloud like AWS, that charges bandwidth usage fees, Cloudflare can also cut down on your hosting expenses. Cloudflare provides a flat rate for your CDN account and cuts down on the bandwidth required from your main hosting account by spreading traffic across Cloudflare’s network.

Loading Speed

Aside from having servers closer to where your shoppers are located, Cloudflare provides additional layers of speed improvement. For instance, Cloudflare can automatically compress images; minify HTML, CSS, and JavaScript; bundle JavaScript files; optimize browser caching; load content with AMP technology; and load content asynchronously rather than waiting as slower scripts are loaded in browsers. 

Cloudflare can also leverage TLS 1.3, HTTP2, and other modern standards to help improve the time it takes for your site to load in addition to making sure that technology like GZIP is more likely leveraged. It can additionally serve up automatically optimized versions of files for different devices and browsers.

DNS & Load Balancing

When a shopper tries to navigate to your website, your DNS service directs them to the correct servers. Cloudflare provides a DNS service that’s faster than the average. It’s one of the largest DNS networks in the world, managing almost 40% of managed DNS domains. It’s also more reliable than most, given Cloudflare’s global network and comes with a 100% uptime SLA.

With traffic routing in mind, Cloudflare also provides a powerful Load Balancer, allowing traffic to be spread across servers and even data centers. For instance, a Magento merchant can have primary dedicated servers with JetRails and load balance with AWS servers that JetRails manages. This enables a truly elastic hosting solution. These load balancers can also be used when setting up failover servers. Cloudflare can automatically reroute traffic if a network, like AWS, experiences an outage.

With DNS in mind, Cloudflare also uses technology to avoid DNS Spoofing and Man-in-the-middle attacks.


Cloudflare provides a web application firewall (WAF) that helps block many types of attacks such as bad traffic, injection attempts, scrapers, and bots designed to commit checkout fraud. Additionally, it gives you the power to block traffic from countries known as staging grounds for hackers. If you don’t sell to these countries, it may be best to simply block them from accessing your site in order to cut down on potential threats.

Cloudflare’s WAF users get the benefit of a “collective intelligence” system. In other words, as Cloudflare identifies and blocks threats to other Magento sites, their WAF is getting smarter and better at blocking these threats for all Cloudflare’s customers. In many cases, Cloudflare’s WAF will even help you pass your PCI compliance scans.

Cloudflare can rate limit users that have unusual and suspicious interactions with your site,  such as high request rates or brute force login attempts. It can also use automatic HTTPS rewrites so that if you have some content in your site that’s available via HTTP, Cloudflare can automatically rewrite the insecure URLs to leverage your SSL for a secure connection.

JetRails goes above and beyond Cloudflare’s natural security protections by applying some of our own blacklists to help block even more known bad IPs.

Additionally, Cloudflare is not a black box. You can access and audit logs, see a wide range of analytics reports, and insights into detected (and thwarted) threats.

At JetRails, we’re such big fans of what Cloudflare does for Magento merchants that we’ve built Cloudflare Extensions for Magento 1 & 2. These Cloudfare extensions can be downloaded from the Magento Marketplace for free as part of our commitment to the Magento community and ecosystem. We’ve partnered with Cloudflare to ensure that our clients receive the most benefit from a CDN service. Need help setting up or optimizing Cloudflare? We’re here to help!

Related Post

We can’t wait to talk to you.