Host your Gatsby site at your own address

gatsby build leaves you a public folder of static HTML. Drag it in and the site is live over HTTPS, with no platform to sign up for.

You can host:
index.html/assetsfolder.zip

Free to use, live at your-name.99helpers.site in about ten seconds.

Why publishing is the slow part

A Gatsby build is static by default: pages are rendered to HTML at build time and hydrate in the browser. That makes it portable, which matters more than it used to — plenty of Gatsby sites are now maintained by someone who inherited them and wants them hosted somewhere simple and cheap.

What a Gatsby build gives you

  • A public folder with every page rendered to HTML
  • Webpack bundles and page-data JSON under static paths
  • Images processed at build time by the image plugins
  • A 404.html generated from your 404 page

Build it, then upload it

Build command
gatsby build
Folder to upload
public/
Check pathPrefix in gatsby-config.js
Build without --prefix-paths so the site works at the root of its own address.

Long builds, small changes

A remote build for a content tweak can take minutes. Building locally and uploading the result skips the queue entirely.

Inherited sites, forgotten accounts

Taking over a Gatsby site often means chasing down whose account it's deployed from. A fresh upload sidesteps that.

pathPrefix changes the build

Building with --prefix-paths bakes the prefix into asset URLs, so the same output won't work at a root address.

Publishing a Gatsby site

  1. 1

    Build without a path prefix

    Run gatsby build. Leave off --prefix-paths so the asset URLs point at the root, which is where your site will live.

  2. 2

    Upload the public folder

    Drag public in, or a zip of what's inside it, and choose an address. index.html is at the top level of the build, which is what gets served.

  3. 3

    Share it

    The site is live over HTTPS immediately. Rebuild and publish to the same address whenever the content changes.

Worth knowing

  • Gatsby writes each route as a folder with index.html inside, and folder URLs are served as pages here.
  • The 404.html Gatsby generates is picked up automatically for missing pages.
  • Client-side routing, prefetching and page-data fetches all work, because the files are served exactly as built.
  • Gatsby Functions and anything else that runs server-side won't work on static hosting — those need a platform with a runtime.
  • A large Gatsby build can produce a lot of files; the site limit is 500 files and 100 MB, so check the size of public before publishing.

Questions

Do you run gatsby build?
No. You build locally or in your own CI and upload the public folder, which is why the site goes live in seconds rather than after a queued build.
Do Gatsby Functions work?
No. They need a server to run on. The rest of a Gatsby build is static and works normally.
Will image plugins still work?
Yes. Image processing happens during gatsby build, so the generated files are part of what you upload.
Does client-side routing survive?
Yes, and every route also exists as its own HTML file, so a refresh or a direct link loads the right page.
How do I update a page?
Rebuild and publish to the same address. The link doesn't change, and earlier versions are kept if you need to go back.

Publish the Gatsby build you already have

Drop the folder in at the top of this page and see the link for yourself. You only make an account once it's ready to go live.

Every site gets its own address on 99helpers.site — see static site hosting for every generator, how website hosting works here or free file hosting for any file type.