namr

How to Use Cloudflare CDN with DreamHost Hosting in 2025

Cloudflare's Content Delivery Network (CDN) dramatically improves website speed by serving your content from servers closest to your visitors. Combined with DreamHost's reliable hosting, Cloudflare provides faster page loads, better security, and enhanced performance—all available on Cloudflare's free plan.

This comprehensive guide shows you how to integrate Cloudflare with your DreamHost website, optimize settings for maximum performance, and troubleshoot common issues.

What is Cloudflare and Why Use It?

What Cloudflare Does

Content Delivery Network (CDN):

  • Caches static content (images, CSS, JavaScript) on 310+ servers globally
  • Serves content from server nearest to visitor
  • Reduces server load on DreamHost
  • Faster page loads worldwide

Security Features:

  • DDoS protection (Distributed Denial of Service)
  • Web Application Firewall (WAF)
  • SSL/TLS encryption
  • Bot protection
  • Hotlink protection

Performance Optimization:

  • HTTP/2 and HTTP/3 support
  • Auto-minification of HTML, CSS, JavaScript
  • Image optimization (Paid plans)
  • Mobile optimization
  • Browser caching optimization

Cloudflare Benefits for DreamHost Sites

Speed Improvements:

  • 30-50% faster page loads average
  • Better Google PageSpeed scores
  • Improved Core Web Vitals
  • Faster international access

Bandwidth Savings:

  • Reduced DreamHost bandwidth usage
  • CDN serves cached content
  • Less server resource consumption

Security Enhancement:

  • Firewall protects against attacks
  • SSL/TLS termination
  • Real-time threat blocking
  • Protects against spam and bots

Free Plan Includes:

  • Unlimited bandwidth
  • Unlimited DDoS mitigation
  • Shared SSL certificate
  • 3 Page Rules
  • Universal SSL

Cost: FREE (paid plans from $20/month add features)

Two Methods to Integrate Cloudflare with DreamHost

Method 1: Direct Cloudflare Setup (Recommended)

Advantages:

  • Full Cloudflare feature access
  • Complete control over settings
  • Advanced analytics
  • More page rules
  • Better caching control

Disadvantages:

  • Requires nameserver change
  • More steps to configure
  • Manage DNS yourself

Best For: Users wanting maximum control and features

Method 2: DreamHost Built-in Cloudflare

Advantages:

  • Simpler setup
  • No nameserver changes
  • DreamHost manages integration
  • One-click enable

Disadvantages:

  • Limited features
  • Less control
  • Fewer optimization options
  • Not recommended by experts

Best For: Users wanting simplest setup (but experts recommend Method 1)

Important: This guide focuses on Method 1 (Direct Cloudflare Setup) for best results.

Prerequisites

Before integrating Cloudflare:

  1. Active DreamHost Hosting

    • Website hosted on DreamHost
    • Domain working properly
  2. Domain Access

    • Domain registrar login credentials
    • Ability to change nameservers
  3. DNS Record Knowledge (Helpful)

    • Understand basic DNS concepts
    • Can copy/paste DNS records
  4. Cloudflare Account (Free)

    • Will create during setup
    • No credit card required for free plan

Step-by-Step: Direct Cloudflare Integration

Step 1: Document Current DNS Settings

Before changing anything, record your current DNS configuration.

In DreamHost Panel:

  1. Navigate to DNS

    • Panel > Domains > Manage Domains
    • Click "DNS" under your domain
  2. Screenshot DNS Records

    • Take screenshot or copy all records
    • Note: Type, Name, Value for each record
    • Save this information

Common DNS Records:

  • A Record: Points to IP address
  • CNAME: Alias to another domain
  • MX: Mail server records
  • TXT: Verification and SPF records

Important: You'll recreate these in Cloudflare.

Step 2: Create Cloudflare Account

  1. Visit Cloudflare

  2. Create Account

    • Enter email address
    • Create strong password
    • Click "Create Account"
  3. Verify Email

    • Check email inbox
    • Click verification link
    • Return to Cloudflare

Step 3: Add Your Site to Cloudflare

  1. Add Site

    • Dashboard: Click "Add a Site"
    • Enter your domain: yourdomain.com
    • Click "Add Site"
  2. Select Plan

    • Choose "Free" plan ($0/month)
    • Click "Continue"
    • Free plan includes all essentials
  3. DNS Scan

    • Cloudflare scans existing DNS records
    • Wait 60-120 seconds
    • Displays found DNS records

Step 4: Review and Add DNS Records

Important Step: Ensure all DNS records transferred correctly.

  1. Review Scanned Records

    • Cloudflare shows found DNS records
    • Compare with your DreamHost DNS screenshot
  2. Add Missing Records

    • If any missing, click "Add Record"
    • Enter Type, Name, Content
    • Click "Save"

Critical DNS Records:

A Record (Required):

  • Type: A
  • Name: @ (or yourdomain.com)
  • Content: Your DreamHost IP (from DreamHost DNS)
  • Proxy status: Proxied (orange cloud)

WWW CNAME (Recommended):

  • Type: CNAME
  • Name: www
  • Content: yourdomain.com
  • Proxy status: Proxied (orange cloud)

MX Records (Email - Critical):

  • Type: MX
  • Name: @ or yourdomain.com
  • Mail server: From DreamHost DNS (e.g., mx1.dreamhost.com)
  • Priority: From DreamHost DNS (usually 10, 20)
  • Proxy status: DNS only (gray cloud) - IMPORTANT!

TXT Records:

  • Copy exactly from DreamHost
  • SPF, DKIM, verification records
  • Proxy status: DNS only
  1. Continue
    • After verifying all records
    • Click "Continue"

Step 5: Update Nameservers

Cloudflare now provides custom nameservers for your domain.

Cloudflare Nameservers: Cloudflare displays two nameservers like:

  • cora.ns.cloudflare.com
  • trey.ns.cloudflare.com

Your nameservers will be different - copy YOUR assigned nameservers exactly.

Update Nameservers at Domain Registrar:

If Domain Registered at DreamHost:

  1. DreamHost Panel

    • Domains > Registrations
    • Click domain name
  2. Nameservers

    • Click "Nameservers" tab
    • Select "Use another host's nameservers"
  3. Enter Cloudflare Nameservers

    • Nameserver 1: [Your Cloudflare NS1]
    • Nameserver 2: [Your Cloudflare NS2]
    • Delete any additional nameservers
    • Click "Save Nameservers"

If Domain Registered Elsewhere:

Process varies by registrar (GoDaddy, Namecheap, etc.):

  1. Log into domain registrar
  2. Find DNS or Nameserver settings
  3. Change to custom nameservers
  4. Enter Cloudflare's provided nameservers
  5. Save changes

Propagation Time:

  • Can take 2-48 hours
  • Usually completes within 2-6 hours
  • Cloudflare emails when active

Step 6: Configure Cloudflare Settings

While waiting for nameserver propagation, optimize Cloudflare settings.

SSL/TLS Settings:

  1. SSL/TLS Tab

    • Cloudflare Dashboard
    • Click "SSL/TLS"
  2. Set Encryption Mode

    • Choose: "Full (Strict)" if you have DreamHost SSL
    • Or: "Full" if using DreamHost SSL
    • Never use "Flexible" (insecure)

Why Full (Strict):

  • Encrypts visitor-to-Cloudflare
  • Encrypts Cloudflare-to-DreamHost
  • Most secure option
  • Requires valid SSL on DreamHost (which you have)

Caching Settings:

  1. Caching Tab

    • Click "Caching"
  2. Caching Level

    • Standard (recommended for most)
    • or Aggressive (cache everything)
  3. Browser Cache TTL

    • Set to: "Respect Existing Headers"
    • Or 4 hours to 1 year
  4. Always Online

    • Enable "Always Online"
    • Serves cached version if server down

Speed Optimizations:

  1. Speed Tab (or Auto Minify under "Speed")

  2. Auto Minify

    • Check JavaScript
    • Check CSS
    • Check HTML
    • Reduces file sizes
  3. Brotli Compression

    • Enable Brotli
    • Better compression than gzip
  4. HTTP/2 to Origin

    • Enable if available
    • Faster communication with DreamHost
  5. Early Hints

    • Enable Early Hints
    • Faster page loads

Firewall Settings:

  1. Security Tab

  2. Security Level

    • Set to: Medium (recommended)
    • Or High if experiencing attacks
  3. Challenge Passage

    • 30 minutes (default)
  4. Browser Integrity Check

    • Enable (blocks suspicious browsers)

Step 7: Verify Cloudflare is Active

Check Status:

  1. Cloudflare Dashboard

    • Overview tab
    • Status should show "Active"
  2. Verify on Website

    • Visit your website
    • View page source (right-click > View Page Source)
    • Search for "cloudflare" or "cf-ray"
    • Presence indicates Cloudflare active
  3. DNS Propagation Check

  4. Test Tools

Optimizing WordPress with Cloudflare

Recommended WordPress Settings

Cloudflare WordPress Plugin:

  1. Install Plugin

    • Dashboard > Plugins > Add New
    • Search "Cloudflare"
    • Install "Cloudflare" official plugin
    • Activate
  2. Configure Plugin

    • Settings > Cloudflare
    • Enter Cloudflare API token
    • Configure caching options
    • Enable Automatic Cache Purge

Page Rules for WordPress:

Bypass Cache for Admin/Login:

  1. Page Rules Tab

    • Cloudflare Dashboard > Rules > Page Rules
    • Click "Create Page Rule"
  2. Admin Area Rule

    • URL: *yourdomain.com/wp-admin*
    • Setting: Cache Level = Bypass
    • Click "Save and Deploy"
  3. Login Page Rule

    • URL: *yourdomain.com/wp-login.php*
    • Cache Level = Bypass
  4. Shopping Cart (WooCommerce)

    • URL: *yourdomain.com/cart*
    • Cache Level = Bypass
    • URL: *yourdomain.com/checkout*
    • Cache Level = Bypass

Cache Everything Rule:

For maximum caching (advanced):

  • URL: *yourdomain.com/*
  • Cache Level: Cache Everything
  • Edge Cache TTL: 1 month

Free Plan Limitation: Only 3 page rules. Choose most important.

Purging Cloudflare Cache

When to Purge:

  • After publishing new content
  • After website updates
  • When changes don't appear

How to Purge:

Method 1: Cloudflare Dashboard

  1. Caching tab
  2. Click "Purge Everything"
  3. Confirm purge
  4. Wait 30 seconds

Method 2: WordPress Plugin

  • Cloudflare plugin purges automatically
  • Or manual purge in WP admin bar

Troubleshooting Common Issues

Website Shows Cloudflare Error Page

Error 521 (Web Server is Down):

  • DreamHost server offline
  • Check DreamHost status
  • Contact DreamHost support

Error 522 (Connection Timed Out):

  • Server taking too long to respond
  • Check DreamHost performance
  • May need to upgrade plan

Error 525 (SSL Handshake Failed):

  • SSL/TLS mode incorrect
  • Change to "Full" or "Full (Strict)"
  • Ensure DreamHost has valid SSL

Email Stopped Working

Cause: MX records proxied through Cloudflare (wrong)

Fix:

  1. Cloudflare Dashboard > DNS
  2. Find MX records
  3. Click orange cloud (make it gray)
  4. Gray cloud = DNS only (correct for email)
  5. Save changes

Website Slower with Cloudflare

Possible Causes:

  • SSL/TLS mode incorrect (use Full Strict)
  • Cache not configured properly
  • Page rules conflicting

Solutions:

  1. Check SSL/TLS mode
  2. Enable Auto Minify
  3. Set appropriate cache rules
  4. Review page rules
  5. Enable Brotli compression

Mixed Content Warnings

Fix:

  1. SSL/TLS > Edge Certificates
  2. Enable "Always Use HTTPS"
  3. Enable "Automatic HTTPS Rewrites"

Redirect Loop

Cause: SSL/TLS mode set to "Flexible" when DreamHost forces HTTPS

Fix:

  • Change SSL/TLS to "Full" or "Full (Strict)"
  • Disable "Always Use HTTPS" temporarily
  • Re-enable after switching modes

Cloudflare Best Practices

Security:

  1. Enable "Always Use HTTPS"
  2. Enable HSTS (HTTP Strict Transport Security)
  3. Set security level to Medium
  4. Enable Bot Fight Mode
  5. Use Page Rules to protect admin areas

Performance:

  1. Enable Auto Minify
  2. Enable Brotli compression
  3. Set appropriate cache levels
  4. Use Cloudflare APO (paid, $5/month for WordPress)
  5. Enable Early Hints

Reliability:

  1. Enable Always Online
  2. Configure proper DNS records
  3. Monitor analytics
  4. Set up alerts

Monitoring:

  1. Check Cloudflare analytics weekly
  2. Review firewall events
  3. Monitor cache hit ratio
  4. Watch for suspicious traffic

Cloudflare Analytics

Available Metrics:

Traffic:

  • Pageviews
  • Unique visitors
  • Requests
  • Bandwidth saved

Performance:

  • Cache hit ratio (aim for 80%+)
  • Response time
  • SSL/TLS traffic percentage

Security:

  • Threats blocked
  • Challenge success rate
  • Firewall events

Access:

  • Dashboard > Analytics & Logs
  • Review weekly
  • Identify issues early

Advanced Features (Paid Plans)

Cloudflare Pro ($20/month):

  • 20 Page Rules
  • Image optimization (Polish)
  • Mobile optimization
  • Web Application Firewall (WAF)
  • Better analytics

Cloudflare Business ($200/month):

  • 50 Page Rules
  • 100% uptime SLA
  • Advanced DDoS protection
  • Prioritized email support
  • Custom SSL certificates

For Most Sites: Free plan is sufficient

Frequently Asked Questions

Is Cloudflare really free?

Yes, Cloudflare's free plan includes unlimited bandwidth, DDoS protection, and SSL. No hidden costs. Paid plans add advanced features.

Will Cloudflare slow down my site?

No, Cloudflare typically speeds up sites by 30-50%. Proper configuration essential for best results.

Does Cloudflare affect SEO?

Positively. Faster page loads improve SEO. Google favors fast sites. Cloudflare helps rankings.

Can I use Cloudflare with DreamPress?

Yes, absolutely. Cloudflare works perfectly with all DreamHost plans including DreamPress.

What about DreamHost's built-in Cloudflare option?

Experts recommend direct Cloudflare signup (Method 1) over DreamHost's integration for more features and control.

Will email continue working?

Yes, if MX records configured correctly (gray cloud, not orange). Email must bypass Cloudflare proxy.

How long does setup take?

Initial setup: 30 minutes. Nameserver propagation: 2-48 hours. Total: Usually same day or next day.

Can I revert if I don't like it?

Yes, change nameservers back to DreamHost. DNS propagates back within 2-48 hours.

Does Cloudflare replace DreamHost hosting?

No, Cloudflare is a CDN that works WITH DreamHost. You still need DreamHost hosting.

What if I have questions?

Cloudflare has excellent documentation and community. DreamHost support can help with DreamHost-side issues.

Getting Started

Improve your website performance today:

  1. Get DreamHost Hosting

  2. Set Up Cloudflare

    • Follow guide above
    • Free plan recommended
    • 30-minute setup
  3. Optimize Settings

    • Configure for your site type
    • Enable recommended features
    • Monitor performance
  4. Find Your Domain

    • Use Namr to discover perfect domain
    • Pair with DreamHost + Cloudflare for optimal performance

Speed matters—combine DreamHost's reliable hosting with Cloudflare's global CDN for the fastest possible website.