A traditional web server does everything at once. It stores your files, runs your code, and sends both to every visitor, and you pay for the box and for the bandwidth. That works until a page gets popular, a video goes around, or a download takes off. Then the bandwidth bill, or the server's capacity, becomes the problem.
Object storage such as Cloudflare R2 splits the job. The server keeps running your pages and code, and the heavy files live somewhere built to hand them out. This article covers why people make that move, what R2 does and doesn't do, and how a migration usually goes.
On most hosting and cloud storage, you pay every time a file is downloaded. A 200 MB video watched 10,000 times is 2 TB of transfer, and the invoice shows it. R2 charges for the storage you use and for the number of requests, not for the data that leaves. For sites that serve large images, video, 3D models, PDFs or software downloads, this is usually the largest saving available.
When the web server serves every file, a burst of downloads competes with the pages and code that need the same CPU, memory and network. Move the heavy files elsewhere and the server only does the small jobs. Many sites can then drop to a smaller, cheaper plan, or stop worrying about traffic spikes.
A single web server sits in one region, so visitors far away wait longer. Behind a custom domain, R2 objects are cached in Cloudflare's network, so repeat requests are answered near the visitor and never reach the storage at all.
A web server has a disk of a fixed size. When it fills, you resize, migrate or add volumes. Object storage has no such ceiling: you add objects and pay for what you hold. There is also a monthly free allowance, so small sites often pay nothing.
R2 is S3 compatible. The same tools you use for any S3 service (command-line clients, sync tools, libraries in most languages) point at R2 with a different endpoint. If you later want to move to another S3-compatible store, the data and the tooling come with you.
Keeping public files in a bucket, away from your application server, means a compromised or overloaded app doesn't take your assets down with it, and the bucket's access rules are separate from the server's. Backups and cross-environment sharing also get simpler when files have one home.
Be honest about the limits before you plan a migration.
/about/ will not return /about/index.html. There are no index documents, no built-in custom 404 page, and no .htaccess-style redirect rules. For a full static site, Cloudflare Pages is usually the better fit, or a small Worker in front of the bucket can add those behaviors.Usually better left where they are, or moved to Pages or Workers instead: HTML pages that rely on clean URLs or redirects, and anything that executes on the server.
A common result looks like this: the pages stay on the original host (or on Pages), and the heavy files are served from a subdomain such as cdn.example.com, backed by R2.
rclone or the AWS CLI, Cloudflare's wrangler, or a desktop file manager that supports R2. Keep the folder structure unchanged so URLs stay predictable.cdn.example.com) so files are served through the CDN. The default r2.dev address is meant for testing and is rate limited, so it isn't suited to production.Cloudflare doesn't charge egress fees on R2. You still pay for storage, and for requests beyond the free monthly allowance. Check Cloudflare's pricing page for current numbers.
You can host a static site, but R2 itself doesn't provide index pages, clean URLs, custom 404 pages or redirects. Cloudflare Pages, or a Worker in front of the bucket, fills that gap. Many sites keep their pages where they are and move only the large files.
Usually yes. R2 is S3 compatible, so tools that accept a custom S3 endpoint can talk to it. Or use a dedicated R2 file manager like R2 Bucket Boss that automatically handles cache purging and other R2 management functions.
That is the CDN cache. Purge the cached URL, or give new versions new file names.
Mostly the file URLs: point image, video and download links at the new domain.
For heavy files, usually yes for visitors far from your server, because the CDN answers from nearby. For small pages on a well-placed server, the difference may be small.
When your files are small, your traffic is low and your current plan already covers it. Moving pays off when large files and traffic make bandwidth or server load your main cost.
Published November 15, 2026. Cloudflare changes R2 features and pricing from time to time, so check Cloudflare's documentation for current details. ← Back to 10base-t