Setting up CloudFlare for Docly sites

Setting up CloudFlare for Docly sites can significantly improve your site's performance and security. In this guide, we will walk you through the steps to configure CloudFlare for your Docly site, ensuring a smooth and efficient setup.

Introduction to CloudFlare

CloudFlare is a content delivery network (CDN) and security service that helps to improve the speed and security of your website. By routing your traffic through CloudFlare's global network, you can reduce latency, protect against DDoS attacks, and ensure your site is always available.

  • Improved website performance through caching and content delivery.
  • Enhanced security with DDoS protection and web application firewall.
  • Global network presence ensuring low latency and high availability.
  • Easy SSL/TLS management for secure connections.

CloudFlare offers a range of features that can be beneficial for your Docly site:

Feature Description
CDN Distributes your content across multiple servers worldwide to reduce load times.
DDoS Protection Protects your site from distributed denial-of-service attacks.
Web Application Firewall Filters and monitors HTTP traffic between a web application and the Internet.
SSL/TLS Encrypts data transferred between your site and its visitors.

Setting Up CloudFlare

To set up CloudFlare for your Docly site, follow these steps:

1. Sign up for a CloudFlare account and add your Docly site.

2. Update your domain's nameservers to point to CloudFlare.

3. Configure your DNS settings in CloudFlare to ensure all traffic is routed through their network.

4. Enable SSL/TLS to secure your site with HTTPS.

Avoiding Infinite Redirect Loops

To prevent infinite redirect loops, configure CloudFlare to handle HTTP to HTTPS redirections properly. Use CloudFlare's "Page Rules" to create a rule that redirects all HTTP traffic to HTTPS.

  • Use CloudFlare's 'Always Use HTTPS' feature to enforce HTTPS connections.
  • Check your SSL/TLS settings in CloudFlare to ensure they are correctly configured. Use mode "Full" - not "Full (strict)" "Flexible" or "Off"

The issue arises when CloudFlare requests your Docly server over HTTP, which then redirects to HTTPS. Since the user is already on HTTPS, this creates a loop where CloudFlare repeatedly requests HTTP and gets redirected to HTTPS. To avoid this, ensure that CloudFlare handles the redirection at the edge, preventing the loop.

Commitment to Security

At Docly, we prioritize the security and performance of your website. By integrating CloudFlare, we ensure that your site is protected against various cyber threats, including DDoS attacks and data breaches. Our commitment to security means that we continuously monitor and update our systems to provide you with the best possible protection. Trust in our dedication to keeping your site safe and secure.