We may earn a commission if you sign up through links on this site, at no extra cost to you. Full disclosure.

Host a Static Site on DigitalOcean

This is the one DigitalOcean product that's genuinely free, and the free tier is more capable than you'd expect: three static sites, automatic HTTPS, a global CDN, and deploys straight from GitHub. The catch is a 1 GiB monthly transfer allowance, which sounds alarming and mostly isn't. Here's the real math.

The short version

If your site is built by Hugo, Astro, Eleventy, Jekyll, Next.js static export, or plain HTML, App Platform will host it for $0 with a custom domain and SSL. Exceed the free transfer and you pay $0.02 per GiB — so a site serving 50 GiB a month costs about a dollar. This is the cheapest credible hosting on this site by a wide margin.

What the free tier actually includes

FeatureFree tier
Static site apps3 (additional ones $3/mo each)
Outbound transfer1 GiB per app, per month
Transfer over the allowance$0.02 per GiB
HTTPSIncluded and automatic
Custom domainIncluded
Global CDNIncluded
DDoS mitigationIncluded
Deploys from GitHub / GitLabIncluded
Team membersUnlimited

Automatic HTTPS, a CDN, and a custom domain on a free tier is unusually generous. The 1 GiB allowance is the thing people misread.

What 1 GiB of transfer really means

The allowance is small, but overage is cheap enough that it rarely matters. Rough monthly costs, assuming an average page weight:

TrafficPage weightTransferMonthly cost
2,000 pageviews500 KB (text-led blog)~0.95 GiB$0
20,000 pageviews500 KB~9.5 GiB~$0.17
20,000 pageviews2 MB (image-heavy)~39 GiB~$0.76
100,000 pageviews2 MB~195 GiB~$3.89

Illustrative estimates, not a quote — your real figure depends on caching, repeat visitors, and asset sizes. The point stands: a busy static site costs a few dollars, not tens. Set a billing alert if you'd rather not be surprised.

Deploying it

Fifteen minutes, most of it waiting for the first build.

1. Get your site into Git

App Platform deploys from GitHub or GitLab. Push either your built output or your source with a build command — both work. There's no drag-and-drop upload option, so Git is required.

2. Create the app

In the control panel, create a new App and connect your repository. DigitalOcean inspects it and usually detects a static site correctly. If it proposes a paid web service component instead, change the component type to Static Site — this is the single most common reason people get an unexpected $5 charge.

3. Set the build command and output directory

Tell it how to build (hugo, npm run build, eleventy) and where the result lands (public, dist, build, _site). Getting the output directory wrong produces a successful build that serves nothing, which is the second most common snag.

4. Add your domain

Add the custom domain in the app's settings, then point your DNS at it. If DigitalOcean manages your DNS it wires up automatically; otherwise add the CNAME it gives you. HTTPS is issued and renewed for you.

5. Deploys happen on push

Every push to your chosen branch triggers a rebuild. There's nothing to maintain, no server to patch, and no SSH key to manage. This is the one guide on this site with no maintenance section, because there genuinely isn't any.

App Platform or Spaces?

Spaces is DigitalOcean's S3-compatible object storage, and it can also serve a static site. It's the right answer less often than people assume.

App PlatformSpaces
Cost$0 to start$5/mo minimum
Included transfer1 GiB per app1 TiB
Included storageRepo-sized250 GiB
Builds from GitYesNo — you upload files
CDN and HTTPSIncludedIncluded
Best forAlmost every static siteLarge media libraries, backups, S3 API access

Use App Platform unless you're serving hundreds of gigabytes of large files, in which case Spaces' 1 TiB of included transfer for $5 becomes the cheaper deal.

Is this right for you?

Yes, if your site is genuinely static — a blog, portfolio, docs site, landing page, or brochure site built by a static site generator. You get free hosting with none of the maintenance burden that comes with a Droplet.

No, if you need a database, user logins, comments, or server-side processing. Static means static. WordPress doesn't run here — that needs a Droplet. You can bolt on third-party services for forms and comments, but if you're doing much of that, a small server may be simpler.

Honest note: the free tier is the cheapest thing on this site, and it earns us nothing. We're including it because it's the right answer for a lot of people, and pretending otherwise would make the rest of these guides less trustworthy.

FAQ

Is it really free, or is there a card requirement?

You need a payment method on the account, as with any DigitalOcean signup. The static site tier itself bills $0 until you exceed the transfer allowance. Set a billing alert if you want a hard warning.

What happens if I go over 1 GiB?

Nothing breaks. The overage bills at $0.02 per GiB. Your site stays up.

Can I host more than three sites?

Yes. Static-only apps beyond the third are $3/mo each — still cheaper than a Droplet if you're hosting several small sites.

How does this compare to GitHub Pages or Netlify?

Functionally similar for simple sites. The practical reason to choose App Platform is if you're already on DigitalOcean and want one bill and one dashboard. If you're not, the alternatives are equally good and we'd not pretend otherwise.

Does it support server-side rendering?

Not on the free static tier. An SSR framework needs a web service component, which starts at $5/mo.

Static sites from $0/mo

Three free apps with HTTPS, a custom domain, and a global CDN.

Try App Platform

Affiliate link — we may earn a commission at no extra cost to you.

← All DigitalOcean guides