michtio/craftcms-claude-skills / skills/craft-cloud
craft-cloud
UnverifiedCraft Cloud — Pixel & Tonic's serverless hosting platform for Craft CMS. Covers craft-cloud.yaml configuration, the Build → Migrate → Release deploy pipeline, the craftcms/cloud extension package, edge image transforms via Cloudflare, edge static caching with cache.rules + ESI, Cloud-managed S3 filesystem, MySQL 8 / Postgres 15 databases (no MariaDB, no tablePrefix), Console-based command runner and scheduled cron (once-per-hour minimum), auto-handled queue jobs, custom domains and SSL, preview environments per branch, Cloud limitations (ephemeral filesystem, no SSH, no .htaccess, no built-in mail), plugin development requirements for Cloud compatibility, and self-hosted → Cloud migration.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 18.8 KB |
| references/assets-and-transforms.md | markdown | 5.5 KB |
| references/caching-and-edge.md | markdown | 23.4 KB |
| references/commands-and-cron.md | markdown | 7.0 KB |
| references/config-file.md | markdown | 6.9 KB |
| references/database.md | markdown | 6.0 KB |
| references/deploy-pipeline.md | markdown | 16.6 KB |
| references/domains.md | markdown | 5.4 KB |
| references/extension.md | markdown | 15.6 KB |
| references/headless.md | markdown | 8.0 KB |
| references/limitations.md | markdown | 17.3 KB |
| references/local-dev.md | markdown | 6.8 KB |
| references/migration.md | markdown | 8.6 KB |
| references/plugin-development.md | markdown | 14.5 KB |
references/domains.md
View on GitHub# Custom Domains and DNS
Add a custom domain in the Cloud Console, prove ownership with a TXT record, validate the certificate with provided records, then route traffic via CNAME. SSL is auto-issued by Cloudflare. `www` is not auto-created.
## Documentation
- Domains: https://craftcms.com/docs/cloud/domains
- Cloudflare (Orange-to-Orange): https://craftcms.com/docs/cloud/cloudflare
## Common Pitfalls
- Adding a CNAME for `example.com` (the apex) and expecting it to work everywhere. Most DNS providers can't put CNAME on the apex — use the two A records Cloud provides in the Route Traffic step instead. CNAME flattening is provider-specific (Cloudflare and a few others support it).
- Pointing the domain at Cloud before the TXT ownership record propagates. Cloud rejects the routing until it can verify ownership via `_cf-custom-hostname` + your domain.
- Adding the root domain only and expecting `www.example.com` to also work. `www` is a separate hostname — add it explicitly if you want it. The docs are explicit.
- Removing the verification TXT records after the initial validation. Cloudflare may re-check periodically — leave the records in place.
- Trying to manage Cloudflare's edge config yourself (page rules, transform rules, workers) on a domain Cloud is fronting. Cloud's edge layer is the boundary; you can't add another Cloudflare layer in front (Orange-to-Orange has a specific setup — see Cloudflare doc).
## Adding a domain
In the Cloud Console: **Domains → New domain**.
1. Enter the root domain (`example.com` — not `https://example.com`, no path).
2. Optionally pick an environment to route to (you can do this later).
3. Cloud walks you through verification, certificate validation, and traffic routing in turn.
You complete each step in the DNS provider's UI, then return to Cloud to confirm.
## Required DNS records
### 1. Ownership verification (TXT)
| Type | Name | Value |
|---|---|---|
| TXT | `_cf-custom-hostname.example.com` | Provided by Cloud |
Cloud uses this to confirm you control the domain before issuing a cert or accepting traffic.
### 2. Certificate validation (CNAME + 2 TXT)
Cloud's Console shows three records — typically one CNAME and two TXT — that complete the SSL certificate handshake with Cloudflare's CA. Copy them as shown.
### 3. Traffic routing
**For subdomains** (preferred wherever possible):
| Type | Name | Value |
|---|---|---|
| CNAME | `www.example.com` (or any subdomain) | `edge.craft.cloud` |
**For apex domains** (when CNAME flattening isn't available):
Cloud's Route Traffic step shows two A-record IPs to use:
| Type | Name | Value |
|---|---|---|
| A | `example.com` | IP from Route Traffic step |
| A | `example.com` | (second) IP from Route Traffic step |
If your DNS provider supports CNAME flattening (Cloudflare, Route 53 with alias records, DNSimple, others), use a flattened CNAME → `edge.craft.cloud` instead of the A records — it stays correct if Cloud's edge IPs change.
## SSL
Cloudflare auto-issues and rotates SSL certificates for every domain pointed at Cloud. There's no manual certificate management — no Let's Encrypt cron, no upload step. Once the ownership TXT and cert-validation CNAME/TXT records are in place, SSL is live within minutes.
## The `www` subdomain
Not auto-created. If you want `www.example.com` to work alongside `example.com`, add it as a separate domain in the Cloud Console, with its own DNS records.
A common pattern: redirect `www` → apex (or vice versa) via `redirects:` in `craft-cloud.yaml`. See `config-file.md` (Redirects).
## Preview domains
Every environment gets an auto-assigned preview URL:
```
project-{handle}-environment-{prefix}.preview.craft.cloud
```
Examples:
- `project-acme-marketing-environment-b62dec18.preview.craft.cloud`
- `project-acme-marketing-environment-a1f0e29b.preview.craft.cloud`
The handle is the project's URL slug; the prefix is the first segment of the environment's UUID. Access via the globe icon in Console.
Preview URLs are useful for:
- Sharing a staging environment with a stakeholder before DNS cutover.
- Per-branch testing when each Cloud environment tracks a different Git branch.
- Final verification before swinging production DNS.
## Pricing
Every project includes one root domain plus unlimited subdomains on that root. Additional root domains can be purchased — pricing isn't documented inline; check the Console for current rates (the survey noted "$20/mo each" historically, but verify against the Console UI).
## Cloudflare Orange-to-Orange
If your domain is already proxied through Cloudflare on your own account (orange cloud icon in Cloudflare DNS), Cloud needs a specific setup so Cloud's Cloudflare layer doesn't conflict with yours. See the dedicated [Cloudflare doc](https://craftcms.com/docs/cloud/cloudflare) for the configuration. The short version: enable Custom Hostnames on your Cloudflare account and follow the documented record set rather than the default subdomain CNAME flow.
If your domain isn't proxied through your own Cloudflare account, you don't need this — the default DNS flow handles everything.
## DNS propagation
Cloud notes: "anywhere from a couple of minutes to 24 hours." Plan DNS cutover during a low-traffic window if minutes matter. For pre-cutover validation, use the preview URL.
Last verified against https://craftcms.com/docs/cloud/domains and https://craftcms.com/docs/cloud/cloudflare on 2026-05-28.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |