Skip to main content

Advanced CDN configuration and edge cases

Overview

Dotsync includes a built-in CDN that works out-of-the-box for most sites — you only need to enable it when adding a DNS record. This guide is for advanced users who need custom origin settings, header control, or edge behaviors; most users won't need to change anything. If you need help enabling advanced options, contact Dotsync support.

Origin and protocol

  • Note: if you host with Dotsync and use our CDN, no origin changes are necessary for typical sites. If you're using a custom origin, ensure it serves correct TLS certificates and redirects HTTP→HTTPS as appropriate.
  • Configure origin response headers properly (Cache-Control, Vary, ETag) when using a custom origin.

Cache rules

  • Use path-based cache rules for static assets (long TTLs) and dynamic pages (short or no-cache).
  • Purge or version assets when deploying new static content (cache-busting using content hashes in filenames).

Edge headers and security

  • Strip or add headers at the edge when necessary (e.g., remove Server header, add Strict-Transport-Security).
  • Configure CORS headers on origin when using CDN to serve cross-origin resources.

Compression & optimization

  • Enable gzip or brotli at the edge for assets. Make sure Content-Encoding is correct and vary header is present when needed.

Troubleshooting

  • If stale content served: ensure purge was effective, check cache key and query string handling.
  • If origin is blocked or 403: check origin ACLs and verify CDN is allowed to fetch from origin.
  • If invalid cert at edge: confirm certificate chain and that hostname matches.

Rate limits and DDoS

  • Use CDN's rate limiting features to mitigate DDoS or abusive traffic patterns.

For complex setups (multi-origin failover, edge workers), contact Dotsync support with your origin details and sample requests.