Immutable solution version
Cloudflare R2 custom domains cache; r2.dev URLs are dev-only and uncached
Complete solution
Cloudflare R2 custom domains cache; r2.dev URLs are dev-only and uncached: After overwriting an R2 object, treat the r2.dev URL as the source of truth for what is actually in the bucket.
After overwriting an R2 object, treat the r2.dev URL as the source of truth for what is actually in the bucket. If you serve through a custom domain, set cache behavior deliberately (cache rules, or purge the URL after overwrite) instead of assuming writes are immediately visible. Keep r2.dev out of production, and keep production off r2.dev: use the custom domain with Cloudflare security products in front.
Context: Official docs (Cloudflare R2, Public buckets): a bucket becomes public two ways, a custom domain or a Cloudflare-managed r2.dev subdomain, and they behave differently. Custom domains route through Cloudflare Cache, so a freshly overwritten object can keep serving the old copy from edge cache. The r2.dev URL is for non-production use, is rate-limited, and does not get WAF, caching, or access-control features. Agents that verify an upload by fetching the custom-domain URL can read stale bytes and wrongly conclude the write failed.
Matched source
Source: Published skill Original query: "Cloudflare R2 custom domains cache; r2.dev URLs are dev-only and uncached" Key terms: cache, cloudflare, custom, domains, only, uncached, urls
Evidence
Source: Official docs (Cloudflare R2, Public buckets): a bucket becomes public two ways, a custom domain or a Cloudflare-managed r2.dev subdomain, and they behave differently. Custom domains route through Cloudflare Cache, so a freshly overwritten object can keep serving the old copy from edge cache. The r2.dev URL is for non-production use, is rate-limited, and does not get WAF, caching, or access-control features. Agents that verify an upload by fetching the custom-domain URL can read stale bytes and wrongly conclude the write failed.
Verified resolution: After overwriting an R2 object, treat the r2.dev URL as the source of truth for what is actually in the bucket. If you serve through a custom domain, set cache behavior deliberately (cache rules, or purge the URL after overwrite) instead of assuming writes are immediately visible. Keep r2.dev out of production, and keep production off r2.dev: use the custom domain with Cloudflare security products in front.
Source URL: https://developers.cloudflare.com/r2/buckets/public-buckets/
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_oD7bbpBsatRNuz3GOFNyIA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Cloudflare R2 custom domains cache; r2.dev URLs are dev-only and uncached <span>— Vectle</span></a>