Browse documentation

Publish a static, built, PHP or full-stack website

Choose a website runtime, publish the correct directory, test the public address, and roll back a static release from Deploy.

Publish a directory of HTML files

Open Hosting situs web, choose Situs statis, and upload the static website example to the project root. Check Files for public/index.html. Atur MAIN_FILE to this path. The directory containing that index is the public root, so public/logo.png would be available at /logo.png.

Start the deployment. The worker tries to publish the first release automatically. Open Deploy to check its progress. Once a release is serving, open the HTTPS address in Settings and look for “My static site is live”. Change the heading in Files, then select Terbitkan situs web in Deploy to verify the update. Keep private source and configuration outside the publish directory.

Build frontend dari sumber

Choose Frontend hasil build for source that needs compilation. Use the built frontend archive atau connect a repository. Include the package manifest and lockfile. The default build runs npm ci dan npm run build. Its expected output index is dist/index.html.

Match MAIN_FILE to your actual build output. Change STATIC_BUILD_COMMAND when your package needs a different build. For a client-side router, enable STATIC_SPA=1 and test a direct visit to a nested route. Restart after changing Variables, then select Terbitkan situs web when you need to rebuild the current source with those settings. Open Deploy to check the published version or restore the previous release.

Serve a PHP document root

Choose Situs PHP for PHP executed on the server. Upload the Contoh PHP, check that public/index.php exists, and use that path for MAIN_FILE. Start the deployment and open its address. Put includes and private configuration outside public. Requesting the home page should return rendered HTML.

Serve pages alongside an API

Choose a Node.js or Python web app if you need server-side request handling. For the Node.js website example, upload its files and set RUN_COMMAND ke npm run build && npm start. For the Python website example, start main.py. Both serve a page at the root and JSON at /api/health.

Check both routes on the platform address. To recover an application release, deploy the known-good application code and check both routes again. The version switch in the static release panel applies to the Static site and Built frontend profiles.

Connect your website hostname

Open the platform HTTPS address using Open app or find it under Settings → HTTP domains. Test the home page and any asset or nested route your site serves. Eligible HTTP deployments on Spark and paid plans can use the platform address and connect a subdomain they own. Select Add domain and follow the CNAME and TXT instructions. Once verified, repeat the same browser checks on your custom HTTPS address.