Website hosting
Publish a folder of HTML, build a frontend from a repository, or run server-side code. The right runtime depends on what needs to happen when a visitor requests a page.
public/index.htmlGET /My static site is liveEdit public/index.html and publish again to update this page.
From a folder of HTML to a live website
Publish prebuilt files
Upload the directory that contains index.html, your stylesheets and images. A portfolio or documentation site can ship directly from those files. Test an image and a deep link as well as the home page.
Publish a static siteBuild a frontend from source
Keep the build command, manifest and lockfile with your source. Select the generated index in the output directory. Variables that the bundler embeds in browser JavaScript must be safe for visitors to read.
Configure public build variablesServe dynamic pages
Choose PHP for server-rendered PHP projects, or run an application server for a Node.js or Python site. This gives you a place to handle form submissions, read private credentials and query a database on the server.
Compare the website runtimesBring your own domain
Start with the platform HTTPS address. On your deployment, including an eligible Spark site, add the CNAME and ownership TXT record from Settings. Check the same page on both hostnames before sharing the new address.
Verify a custom hostnameWhat produces the page?
If the HTML already exists, publish the directory that contains it. If npm generates the files, choose Built frontend. When each request needs a database lookup or a server-rendered response, choose a runtime for the language handling it.
- Deploy Node.js web app on Spark
Node.js web app
Serve a frontend and API from your Node.js process.
- Deploy Python web app on Spark
Python web app
Serve pages and API routes from your Python project.
- Deploy Static site on Spark
Static site
Publish an HTML directory or prebuilt frontend files.
- Deploy Built frontend on Spark
Built frontend
Build a frontend from its source and publish the output.
- Deploy PHP site on Spark
PHP site
Serve PHP from a dedicated web runtime with a public document root.
Publish your first version
Point to the public index
For the HTML example, upload
public/index.htmland setMAIN_FILEto that path. Usepublic/index.phpfor the PHP example. Keep private configuration outside that directory.Build when your source needs it
The frontend build example includes the manifest and lockfile for
npm cifollowed bynpm run build. The default output index isdist/index.html. AdjustSTATIC_BUILD_COMMANDand the index path to match your project.Check the release on HTTPS
Start the deployment. Static and built sites try to publish their first release automatically. Check its status in Deploy and choose Publish website after changing files. Open the address in Settings and test the home page and any asset or nested route your site serves. For an app, also exercise an API route before connecting a custom domain. Eligible Spark sites can connect one too.
Rehearse a static website rollback
A useful time to learn how releases work is while your site still has one page. This exercise works for Static site and Built frontend, including a site built from a connected branch.
Follow the static release recovery guidePublish a version you can recognize
Change the heading on the home page, publish the release and open the platform address. Note the heading, a linked asset and the release you just checked. The source tree and the files currently served can be different.
Publish a second version
Change the heading again and publish. Request the same address and verify the second heading and asset. For a built site, also open a nested route directly to catch missing files or a client-router fallback issue.
Switch the served release
In Deploy select the previous published release. Reload and verify the first heading and asset. The working files still contain your newer changes, so repair those before publishing the next version.
Website hosting plans
One account plan covers your deployments. Divide its memory, storage and CPU among the projects you run together.
| Plan | Memory | Storage | CPU | Deployments | File backup | History | Per month |
|---|---|---|---|---|---|---|---|
| Spark | 256 MB | 512 MB | 25% | 1 | Every hour | 24 hours | $0.00 |
| Relay | 1 GB | 5 GB | 50% | 2 | Every 15 minutes | 3 days | $2.25 |
| Circuit | 2 GB | 8 GB | 100% | 4 | Every 15 minutes | 7 days | $3.25 |
| Grid | 4 GB | 15 GB | 200% | 8 | Every 5 minutes | 14 days | $6.00 |
| Fleet | 8 GB | 25 GB | 250% | 12 | Every 1 minute | 30 days | $9.00 |
Spark1 deployment$0.00
- Memory
- 256 MB
- Storage
- 512 MB
- CPU
- 25%
- Deployments
- 1
- File backup
- Every hour
- History
- 24 hours
Relay2 deployments$2.25
- Memory
- 1 GB
- Storage
- 5 GB
- CPU
- 50%
- Deployments
- 2
- File backup
- Every 15 minutes
- History
- 3 days
Circuit4 deployments$3.25
- Memory
- 2 GB
- Storage
- 8 GB
- CPU
- 100%
- Deployments
- 4
- File backup
- Every 15 minutes
- History
- 7 days
Grid8 deployments$6.00
- Memory
- 4 GB
- Storage
- 15 GB
- CPU
- 200%
- Deployments
- 8
- File backup
- Every 5 minutes
- History
- 14 days
Fleet12 deployments$9.00
- Memory
- 8 GB
- Storage
- 25 GB
- CPU
- 250%
- Deployments
- 12
- File backup
- Every 1 minute
- History
- 30 days
Prices in USD before tax. A year costs the same as ten monthly payments.
Compare all plan featuresCan I publish a free website without buying a domain?
A small static site can use Spark and the platform HTTPS address on a host with HTTP routing enabled. Upload the built files to keep compilation out of the free plan’s memory budget.
Where should my contact form or private API key live?
Send the form to a server endpoint, such as a PHP handler or a Node.js or Python application. Read the private key there. Browser bundles and static files are downloadable by anyone who visits the page.
Why do styles disappear after publishing?
Compare the stylesheet URL in the generated HTML with its location inside the public directory. With public/index.html as the index, public/style.css is served at /style.css. Check the path and letter case.
Why does refreshing a frontend route return 404?
For a client-side router on a static site, set STATIC_SPA=1 and restart. Test a direct visit to the nested URL as well as navigating there from the home page.
Can I restore the previous version?
For Static site and Built frontend, use the previous published release in Deploy. The release switch changes the files served to visitors while keeping your current working files. For PHP, Node.js or Python, redeploy the known-good source.