Smartqode

Digital Transformation / cPanel

Deploying an Astro Website on cPanel

How to deploy a static Astro build to cPanel by uploading the contents of the dist folder into public_html.

By SmartQode Engineering Team · February 3, 2026

Build static files

Run npm run build and open the generated dist folder.

Upload the right level

Zip the contents inside dist, not the folder itself. After extraction, index.html should sit directly inside public_html.

Test core files

Check the homepage, contact form endpoint, sitemap, robots file, and custom 404 page after upload.