Deploy a site
Build public output, upload it to a static host and verify the live site.
On this page
Zola turns your site into HTML, stylesheets and other files in public/.
Upload that folder to a static web host and the host will serve those files
to your visitors.
1. Set the final URL
In your site's zola.toml, set the complete deployment address:
base_url = "https://example.com/project/"
Use the address your host gives you or the domain you've set up for the site.
Include /project/ if it's part of that address. In Markdown, write internal
links as [About](@/about.md) when you have an about.md file in content/.
Zola can then put the right prefix in the generated link.
Review the Publishing settings for metadata, feeds, favicon, cache headers and CSP before building.
2. Build the files to upload
Open a terminal in the folder with zola.toml. If you cloned a site that uses
a Git submodule for DevLab, first run git submodule update --init --recursive
to restore the theme. Then build the site.
zola check --skip-external-links
zola build
Open public/ and check that it contains index.html and main.css. If you
added the About page, look for public/about/index.html too. For a preview
deployment with a different address, pass it to zola build --base-url.
3. Upload the output
Select public/ if your host asks for the folder to upload or publish. For a
branch-based host, copy the contents of public/ to the root of the
publishing branch, with index.html at the top level.
Serve directory index.html files for clean routes such as /blog/. Configure
the host to use the generated 404.html for missing paths. Host setup differs,
so follow its current instructions in Zola's
deployment documentation.
The theme repository's Woodpecker workflow publishes its own demonstration.
It is not a required pipeline for your site.
4. Verify the published site
Open the public address and follow a menu link to another page. Both pages should have their styles and images. Open the menu on your phone or in a narrow browser window. Try a missing URL to check the host's 404 setup.
If the site has search, run a search in each indexed language. If you publish downloads, open each artifact and check its verification links against the file. Zola's link check covers links in Markdown, so test links from site templates or data on the published site.
If the live site fails, restore the previous output or previous site commit, rebuild with its recorded theme revision and deploy again.