CDN77 and Cloudflare

It is possible to use both Cloudflare and CDN77 simultaneously. However, there are some slight differences. The main difference is that Cloudflare acts as a reverse proxy for your entire website. Therefore the CDN pulls data directly from Cloudflare’s servers rather than from your Origin server.

The process of integrating Cloudflare with CDN77 requires a few settings that need to be enabled in both the Cloudflare panel and the CDN77 panel.

When the Cloudflare reverse proxy is enabled for a specific DNS record (The Orange Cloud Icon), Cloudflare adds Set Cookies to each file. The CDN treats each file that has Set Cookies enabled as dynamic content; therefore, the file does not get cached by CDN77. This is due to the fact that Set Cookies, which Cloudflare assigns to each file, are unique. Therefore, each request is unique. To bypass this setting, you need to do the following:

1. Open your CDN Resource settings.

2. Go to the “Other Settings” tab.

3. Enable the “Ignore Set Cookies” option under this tab.

This will prevent CDN from handling every request as unique based on the Set Cookies, and therefore cached delivery will be enabled for your Cloudflare hosted content.

The last thing is adjusting your Cloudflare’s security settings:

1. Open your Cloudflare client panel.

2. Go to “Security Settings”.

3. Make sure that Security settings are set to the lowest possible setting.

The reason for this is that Cloudflare's automatic security system will try to prevent bots from crawling your site by serving a simple Captcha before a file is served. When the CDN77 Edge servers pull data, Cloudflare will serve a Captcha, subsequently preventing a file from being properly delivered.

You can also decide to use Cloudflare just as a DNS provider for your domain. This is as simple as turning off the orange cloud icon next to a specific DNS record that you wish CDN77 to pull data from. This disables the Cloudflare reverse proxy and enables the CDN to communicate with your Origin server directly.