Deploy a static site
Upload HTML, CSS and JavaScript and put it live - no server code needed.
A static site is just files: HTML pages, CSS, JavaScript and images. Smile Hosting serves them for you, so there’s nothing to install and no app to keep running.
Put it live
- Create a website with the Static framework.
- Open the Source tab and upload your files. Your home page must be called
index.html. - Press Deploy. Your site is live at its address straight away.
Changed or added files? Press Redeploy to put the new version live.
सुझावA new static site starts with a simple starter page. Replace its
index.htmlwith your own, or delete the starter files before you upload yours.
How your files become pages
| File in Source | Address |
|---|---|
index.html |
my-site.smilehosting.tech/ |
about.html |
my-site.smilehosting.tech/about |
blog/index.html |
my-site.smilehosting.tech/blog |
images/logo.png |
my-site.smilehosting.tech/images/logo.png |
- Links don’t need
.htmlon the end -/aboutfindsabout.html. - Add a
404.htmland it’s shown whenever someone visits a page that doesn’t exist. - Files and folders starting with a dot, such as
.envor.git, are never served, and neither arenode_modulesor Pythonvenvfolders. Even so, don’t upload passwords or tokens to a website.
Made with a tool like Vite or React?
Build the site on your computer first - usually with npm run build - and upload what it produces, which is normally a dist or build folder.
If your index.html ends up inside a folder rather than at the top:
- Go to Settings and find Build & Output Settings.
- Set Output Directory to that folder, for example
dist. - Click Save, then Redeploy.
Links and pictures not working?
Use paths from your site’s root, like /images/logo.png, or relative to the page, like images/logo.png. Paths from your own computer, such as C:\Users\...\logo.png, only work on your computer.
Filenames are matched exactly, so Logo.PNG and logo.png are different files. Keep them lowercase to be safe.