Content Delivery Network (CDN) Integration
CDN Overview
CDN integration allows you to serve static files (images, CSS, JavaScript, fonts) from a global network of servers, dramatically improving loading times for visitors worldwide.
Supported CDN Types
- Custom CDN: Any CDN provider with custom URL configuration
- Popular CDN Services: Compatible with CloudFlare, MaxCDN, KeyCDN, and others
CDN Configuration
Configure CDN in CDN tab in the admin panel:
Basic Settings
- CDN URL: Your CDN domain (e.g., cdn.yoursite.com)
- File types: Choose which files to serve via CDN:
- All static files (recommended)
- Images only
- CSS and JavaScript only
- Fonts only
Advanced Settings
- Force HTTPS: Convert all CDN URLs to HTTPS
- Include relative paths: Rewrite relative URLs starting with /
- CDN verification: Test CDN availability before rewriting URLs
- Verification timeout: Custom timeout for CDN availability checks
- Exclusions: URL patterns to exclude from CDN rewriting
Automatic Preconnect
ZiziCache automatically adds preconnect hints for faster CDN connections:
<link rel="preconnect" href="https://cdn.yoursite.com" crossorigin>
CDN Performance Features
- URL caching: Intelligent caching of rewritten URLs
- Cache statistics: Performance monitoring with hit/miss ratios
- Domain validation: Automatic URL format validation
- Response time monitoring: CDN performance tracking
Security and Validation
- CDN URL format validation
- Domain exclusion support
- HTTPS enforcement options
- Cross-origin header management
Troubleshooting
- CDN not working: Check CDN verification status in admin
- Mixed content warnings: Enable “Force HTTPS” option
- Missing files: Verify CDN has synchronized all files
- Slow performance: Check CDN response times in admin