To deploy and manage sites through the CLI, CI/CD, or MCP, see Static Hosting CLI & MCP.
Use cases
- Product websites, campaign pages, help centers, portfolios, and other static websites.
- Build outputs generated by React, Vue, Vite, or static exports from Next.js.
- Workflows that need shareable previews before launch or multiple versions that can be rolled back.
Core concepts
Quick start
1. Open My Sites
Sign in to the StepFun Open Platform, open My Sites from the console sidebar, and click New Site. The site list supports name search and filtering by All, Live, Draft, and Error.2. Prepare and upload website files
In the Publish Site window, enter a site title and upload any of the following by dragging them into the upload area or selecting them with the file picker:- A single
.ziparchive - A website folder
- Multiple website files
dist/ folder, dist/index.html is published as index.html.
3. Confirm the root page
If the uploaded content containsindex.html at its root, the system automatically uses it as the root page.
If there is no index.html, the system lists the available options:
- Select an HTML file to return it when visitors access
/. - Select No root page to return 404 at
/.
index.html at the archive root. The deployment fails if the archive does not contain this file.
4. Generate a preview and launch
Click Publish. The system uploads the files, processes the version, and generates a preview link. When the deployment is ready:- Click Open Preview and check that the page and its resources work correctly.
- Find the version in version history and click Launch.
- Confirm the operation. The selected version replaces the current live version.
Upload requirements and limits
File size and count
- The total size of a deployment must not exceed 50 MB.
- A deployment must not contain more than 5,000 files.
- A site name can contain up to 64 characters.
- The maximum number of saved versions depends on your account quota. If the product indicates that the limit has been reached, delete older versions first.
.zip limit is checked against the archive size. The server checks file types and paths again after extracting the archive.
Supported file types
Common supported types include:html, htm, css, js, mjs, json, map, txt, xml, svg, ico, png, jpg, jpeg, gif, webp, avif, woff, woff2, ttf, otf, eot, wasm, pdf, mp4, webm, mp3, wav, md, markdown, jsonl, tsx, jsx.
The following types are explicitly prohibited:
php, py, exe, sh, bat, cmd, dll, so, jsp, asp, aspx, cgi, pl.
Files with extensions outside the supported list are rejected. We recommend uploading a dist or build directory generated by your build tool instead of source code, dependency directories such as node_modules, or server-side files.
Previews, launch, and version management
Preview links
Each deployment generates a preview link for the new version. Preview links support the following operations:- Open the link to check the version
- Copy the link and share it with collaborators
- Set an expiry: never, 24 hours, 7 days, or 30 days
- Revoke the link
- Generate a new link after revocation
Launch
On the site details page, open the operation menu for a version under Version History and click Launch. A confirmation prompt appears because launching replaces the current live version. Only versions that are not already live and have not been rejected by review can be submitted for launch. The final result is determined by server-side validation. Versions rejected by review or with invalid configuration cannot be launched.Roll back
If a new version has a problem, find an earlier version under Version History, open its operation menu, and click Roll Back. After confirmation, the selected version becomes live and the previous live version remains in history.Republish
The Republish action in the upper-right corner of the site details page has two uses:- Without new files: Reactivate the current live version, for example when the live URL is unavailable or you need to trigger the launch process again.
- With new files: Create a new version. The new version first generates a preview and can be launched after review.
Serving modes
In Site Settings, choose a serving mode:- SPA: Unknown routes return the root page, usually
index.html. Use this for client-side routers such as React Router and Vue Router. Refreshing a route such as/aboutlets the frontend application handle the route. - Static: Missing files return 404. Use this when each URL should map to an existing file in a regular static website.
Custom response headers
Putpage.config.json in the root directory of the uploaded package to configure response headers for different paths:
After deployment, view the parsed rules for the live version in the Response Header Rules tab. This tab is read-only. To change the rules, update
page.config.json and publish a new version. A version with invalid configuration is marked as rejected and cannot be launched.
Build-time environment variables
Configure variables
In Site Settings, add variables under Environment Variables. Variable names must:- Start with an uppercase English letter
- Contain only uppercase English letters, numbers, and underscores, such as
API_BASE_URL - Be unique within a site
Reference variables in files
Use the placeholder in static files. For example:.html, .htm, .js, .css, .json, .txt, .svg, and .xml. Images, fonts, audio, video, and PDF files are not modified. Undefined placeholders remain unchanged.
Environment variables are injected at deployment build time. Saving a variable does not rewrite already published versions. After changing a variable, upload and publish a new build output. Republishing an old version does not inject the latest value.
Do not put passwords, private keys, long-lived access tokens, or other highly sensitive information in frontend environment variables. Static files are sent to visitors, and users may be able to inspect the injected values in their browsers.
Analytics and deployment logs
Open the Analytics tab on the site details page to view:- Request count
- Transferred traffic
- Daily request trends
- Deployment logs, including version, operation, operator, time, and result
24h, 7d, and 30d ranges. New sites and sites without requests show an empty state. Statistics become available after visitors access the live or preview URL.
Site settings and deletion
Site Settings supports:- Renaming the site
- Switching between SPA and Static serving modes
- Managing environment variables
- Deleting the site
Frequently asked questions
/ returns 404
Check that:
index.htmlexists at the root of the uploaded package.- If you uploaded files or a folder, the correct root page is selected.
- The site is not configured with No root page.
- The site is live rather than only having a preview version.
Refreshing a frontend route returns 404
Switch the site serving mode to SPA and revisit the live URL. Static mode returns only files that actually exist.Deployment rejects a file type
Check the file name or extension in the error message. Remove prohibited or unsupported files and publish again. Files inside ZIP archives are checked as well. Make sure the archive does not contain server-side source code or scripts.Environment variables are not updated
Environment variables are replaced at build time. Confirm that the variable is saved, upload a new static build output, and publish a new version. Republishing an old version does not inject the variable again.A preview link does not open
Check whether the link has expired or been revoked. Generate a new link from the version operation menu. A link cannot be restored after its version or site is deleted.A new version cannot be launched
Check the status label on the version. Review rejection, review submission failure, or rejectedpage.config.json configuration can prevent launch. Fix the website or configuration and publish a new version.
Deployment checklist
- The entry file and resource paths use relative paths, with matching case.
- The root directory contains
index.html, or another root page is explicitly selected. - The serving mode matches the application type: SPA or Static.
-
node_modules, source code, and unnecessary server-side scripts have been removed. - The deployment package is no larger than 50 MB and contains no more than 5,000 files.
- Environment variables are saved and do not expose sensitive information to browsers.