Cloudflare Edge Hosting¶
When to use this page¶
Use this guide when hosting a static SkyCMS output with Cloudflare R2 and Cloudflare edge rules in an origin-less pattern.
Prerequisites¶
- Cloudflare account with R2.
- Bucket, API credentials, and custom domain capability.
- SkyCMS publishing configured to target R2.
Core setup flow¶
- Create an R2 bucket.
- Configure
ConnectionStrings__StorageConnectionStringfor R2. - Bind a custom domain to the bucket.
- Add rule for root path rewrite to
/index.html. - Add HTTP to HTTPS redirect rule.
For mixed content scenarios (for example MkDocs content plus SkyCMS pages), add an additional targeted rewrite rule for directory index paths before the root rewrite rule.
SkyCMS storage connection format¶
AccountId=<account-id>;Bucket=<bucket>;AccessKeyId=<access-key-id>;SecretAccessKey=<secret-access-key>;
Operational notes¶
- Keep rule order intentional.
- Validate rewrite behavior with trace tools before going live.
- Use cache rules separately for desired TTL behavior.