Cloudflare for Small Business Websites: Security, Speed, and Protection
Every website I build for clients runs through Cloudflare. Here's why, and how I configure it for maximum security and performance.
Cloudflare sits between your visitors and your web server, providing security, performance, and reliability features that would cost thousands to implement yourself. The best part? Their free tier is genuinely useful for small business websites.
Why Every Website Should Use Cloudflare
When I set up a client's website—whether it's Repasi Motorwerks, Pine Ridge Campground, or this site—Cloudflare is step one. Here's what it provides:
- Free SSL certificates: HTTPS for every site, automatically renewed
- Global CDN: Your content cached at 300+ edge locations worldwide
- DDoS protection: Blocks malicious traffic before it reaches your server
- DNS management: Fast, reliable DNS with DNSSEC
- Bot protection: Filters out malicious automated traffic
- Performance optimization: Minification, compression, image optimization
All of this is available on the free plan. The paid plans add more features, but free is enough for most small business sites.
DNSSEC: Protecting Your Domain
DNSSEC (Domain Name System Security Extensions) is one of the most important—and most overlooked—security features. It prevents DNS spoofing attacks where hackers redirect your visitors to fake versions of your site.
What DNSSEC Does
When someone types your domain into their browser, DNS translates it to an IP address. Without DNSSEC, an attacker could intercept this request and send visitors to a malicious server instead.
DNSSEC adds cryptographic signatures to DNS records, proving they haven't been tampered with. It's like a tamper-evident seal on your domain's address book.
How to Enable DNSSEC
- In Cloudflare dashboard, go to DNS → Settings
- Find the DNSSEC section and click "Enable DNSSEC"
- Cloudflare generates a DS record
- Add this DS record at your domain registrar
- Wait for propagation (can take up to 24 hours)
Once enabled, visitors' DNS resolvers can verify that DNS responses are authentic. Many registrars now support one-click DNSSEC setup if you use Cloudflare's nameservers.
SSL/TLS: Encryption Settings
Cloudflare provides free SSL certificates, but how you configure them matters. There are several encryption modes:
Encryption Modes Explained
- Off: No encryption. Never use this.
- Flexible: Encrypts browser to Cloudflare only. Server connection is unencrypted. Not recommended.
- Full: Encrypts both connections but accepts any certificate on origin server.
- Full (Strict): Encrypts everything and validates the origin certificate. This is what I use.
My Recommended Settings
- SSL/TLS Mode: Full (Strict)
- Always Use HTTPS: On
- Automatic HTTPS Rewrites: On
- Minimum TLS Version: TLS 1.2
- TLS 1.3: Enabled
For Full (Strict) mode, your origin server needs a valid SSL certificate. Cloudflare provides free Origin CA certificates specifically for this purpose.
Cloudflare Turnstile: CAPTCHA Without the Pain
Traditional CAPTCHAs are annoying. Clicking fire hydrants and crosswalks wastes your visitors' time and hurts conversion rates. Turnstile is Cloudflare's privacy-focused alternative.
How Turnstile Works
Turnstile verifies visitors are human without puzzles. It analyzes browser behavior, network characteristics, and other signals to determine if a visitor is legitimate—often completely invisible to the user.
Turnstile Widget Types
- Managed: Usually invisible, shows a widget only when uncertain
- Non-interactive: Shows a loading widget but requires no action
- Invisible: Completely hidden from users
Where I Use Turnstile
- Contact forms
- Quote request forms
- Newsletter signups
- Login pages
- Comment sections
For client sites, I typically use the Managed mode. It provides excellent bot protection while keeping the friction near zero for legitimate visitors.
Implementing Turnstile
<!-- Add to your form -->
<div class="cf-turnstile"
data-sitekey="your-site-key">
</div>
<!-- Add before closing body -->
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>On the server side, validate the token with Cloudflare's API before processing the form submission.
CDN and Performance Features
Cloudflare's CDN caches your content at edge servers around the world. When someone visits your site, they get content from the nearest server rather than your origin.
Performance Features I Enable
- Auto Minify: Compresses JavaScript, CSS, and HTML
- Brotli compression: Better compression than gzip
- Early Hints: Preloads assets while the page is loading
- HTTP/3 (QUIC): Faster, more reliable connections
- Rocket Loader: Optimizes JavaScript loading (test carefully)
Caching Configuration
For static sites and most business websites, I configure:
- Browser Cache TTL: 1 month for static assets
- Edge Cache TTL: 2 hours for HTML, longer for assets
- Cache Level: Standard
Polish (Image Optimization)
Cloudflare's Polish feature (Pro plan and above) automatically optimizes images:
- Converts to WebP for supporting browsers
- Strips unnecessary metadata
- Compresses without visible quality loss
DDoS Protection
DDoS (Distributed Denial of Service) attacks flood your server with traffic to take it offline. Cloudflare absorbs these attacks automatically.
How It Works
Because all traffic flows through Cloudflare's network, they can identify and block attack traffic before it reaches your server. Their network can handle attacks of virtually any size.
Protection Included Free
- Layer 3/4 DDoS protection (network layer attacks)
- Layer 7 DDoS protection (HTTP floods)
- Automatic attack detection and mitigation
- No additional charge during attacks
For small business sites, the free tier provides more than enough protection. You'd need a very specific, targeted attack to require additional measures.
Security Settings I Enable for Every Site
Under Security → Settings
- Security Level: Medium (or High for sensitive sites)
- Challenge Passage: 30 minutes
- Browser Integrity Check: On
Under Security → WAF
- Managed Rules: Enabled (Cloudflare Managed Ruleset)
- Rate Limiting: Configured for forms and API endpoints
Under Security → Bots
- Bot Fight Mode: On (free tier)
- Block AI Scrapers: Consider enabling
Page Rules I Often Create
- Protect admin areas: Higher security for /admin, /wp-admin, etc.
- Cache static assets: Long cache TTL for /images/*, /assets/*
- Force HTTPS: Redirect HTTP to HTTPS
Setting Up Cloudflare: Step by Step
1. Create Account and Add Site
- Sign up at cloudflare.com
- Click "Add a Site" and enter your domain
- Select Free plan (you can upgrade later)
- Cloudflare scans your existing DNS records
2. Update Nameservers
- Cloudflare provides two nameservers
- Go to your domain registrar
- Replace existing nameservers with Cloudflare's
- Wait for propagation (usually 15 minutes to 24 hours)
3. Configure SSL
- Go to SSL/TLS → Overview
- Set encryption mode to "Full (Strict)"
- Enable "Always Use HTTPS"
- Set up Origin CA certificate if needed
4. Enable Security Features
- Turn on Bot Fight Mode
- Enable Browser Integrity Check
- Set Security Level to Medium
- Enable DNSSEC and add DS record to registrar
5. Optimize Performance
- Enable Auto Minify for JS, CSS, HTML
- Enable Brotli compression
- Turn on Early Hints
- Configure caching rules
Common Mistakes to Avoid
- Using Flexible SSL: Always use Full (Strict) for real security
- Not updating nameservers: You must use Cloudflare's nameservers for most features
- Over-aggressive caching: Dynamic content needs shorter TTLs
- Forgetting origin firewall: Still secure your server—Cloudflare is an addition, not replacement
- Ignoring analytics: Cloudflare's analytics show attack attempts and bot traffic
Getting Started
Cloudflare is one of the best investments you can make in your website's security and performance—and it's free to start. I include Cloudflare setup and configuration with every web design project.
Have an existing site that needs Cloudflare protection? Reach out and I can help you set it up properly.
Need help with website security?
I set up Cloudflare, DNSSEC, and security best practices for every client website.