There was a problem loading the comments.

How to Use Plesk Caching with Cloudflare CDN

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

 

Step 1: Enable Caching in Plesk

Let’s make sure caching is active on your server.

  1. Log in to your Plesk panel (https://yourdomain.com:8443)

  2. Go to Websites & Domains

  3. Click Apache & nginx Settings for your domain

  4. In the nginx section, enable:

    • Serve static files directly by nginx

    • Enable caching of static files

  5. Set Expires header value (recommended: 7d)

  6. Click OK or Apply

Now your site will deliver static content (images, CSS, JS) more efficiently from your own server.


Step 2: Create a Free Cloudflare Account

  1. Go to https://www.cloudflare.com

  2. Click Sign Up

  3. Enter your email and password

  4. Add your website (e.g., yourdomain.com)

  5. Choose the Free Plan

Cloudflare will now scan your DNS records.


Step 3: Update Your Nameservers

After scanning, Cloudflare gives you two new nameservers (like lisa.ns.cloudflare.com).

  1. Log in to your domain registrar (e.g., Namecheap, GoDaddy)

  2. Find your domain settings and go to Nameservers

  3. Replace the current nameservers with the Cloudflare ones

  4. Save changes

It may take a few hours for DNS changes to fully apply — but your site stays online the whole time.


Step 4: Enable Cloudflare Caching

Once your domain is active in Cloudflare:

  1. Go to your Cloudflare Dashboard

  2. Select your domain

  3. Go to Caching > Configuration

    • Set Caching Level to: Standard or Aggressive

  4. Go to Speed > Optimization

    • Enable Auto Minify for HTML, CSS, JS

    • Turn on Brotli Compression

This means:

  • Visitors get fast, compressed content from Cloudflare’s global servers

  • Your Plesk server handles backend requests efficiently


Step 5: Add a Page Rule (Optional but Recommended)

To make sure your homepage and static content are fully cached:

  1. Go to Rules > Page Rules

  2. Click Create Page Rule

  3. Add:

     
    http://yourdomain.com/*
  4. Set rules:

    • Cache Level: Cache Everything

    • Edge Cache TTL: 1 day

🔒 Don’t worry — dynamic parts like contact forms still work. Cloudflare skips caching for POST requests and logged-in users.


Your website now uses server-side caching from Plesk and global CDN caching from Cloudflare, giving you:

  • Faster loading times

  • Lower server load

  • Extra security from DDoS, bots, and attacks


Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

CAPTCHA

On-Premise Help Desk Software by SupportPal
© Support Portal - WP Lighthost