Home / Learn HTML / Publish Your Website on Hostinger
Publish Your Website on Hostinger
Put your HTML files on the internet with the hPanel File Manager. The same steps work on most shared hosting.
Theory in plain words
What it is
Publishing means putting your files on a web host so everyone can open them.
Why we use it
A page on your own computer is private. Hosting makes it public at your domain.
How it works
You upload files to public_html using File Manager or FTP. The server serves index.html when someone visits.
Where it is used
- Portfolios
- Business sites
- Landing pages
Before you upload
- Your home page must be named
index.html(lowercase). - Use lowercase file names without spaces:
about-us.html. - Check that all links and image paths are relative, for example
images/logo.png. - Open the site with Live Server and click every link once.
Upload with the File Manager
- Log in to hPanel and open your website.
- Click Files, then File Manager.
- Open the folder
public_html. This is the web root of your domain. - Delete the default placeholder file if there is one.
- Click Upload, choose your files and folders (or upload one ZIP and choose Extract).
- Open
https://yourdomain.com. Press Ctrl+F5 if you still see the old page.
public_html are not on the web. Put private things (like configuration with passwords) outside or protect them.Turn on HTTPS
In hPanel open Security, then SSL and install the free SSL for your domain. Then force HTTPS with .htaccess.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html [L]ErrorDocument 404 /404.htmlCommon problems
| Problem | Likely cause |
|---|---|
| 403 Forbidden | No index.html in the folder, or wrong file permissions (folders 755, files 644) |
| 404 Not Found | Wrong file name. Servers are case sensitive: About.html is not about.html |
| Images missing | Wrong path, or the path starts with C:\ from your computer |
| Old page keeps showing | Browser cache. Press Ctrl+F5, or add ?v=2 to the CSS link |
| Padlock warning (mixed content) | An http:// image or script on an https page. Change to https |
| Page shows code text | File saved as .txt, or missing the .html ending |
Other free places
You can also publish static HTML for free on GitHub Pages, Netlify or Cloudflare Pages. Hosting with PHP (forms, login) needs a normal host like Hostinger.
Quick quiz
1. Which folder holds the files that appear on your domain?
public_html is the web root.
2. Why can About.html fail to open at /about.html?
On Linux hosting About.html and about.html are different files.
3. What does a 403 error often mean?
Check for index.html and set folders to 755 and files to 644.
Common questions
Which folder holds the files that appear on your domain?
public_html. public_html is the web root.
Why can About.html fail to open at /about.html?
Servers are case sensitive. On Linux hosting About.html and about.html are different files.
What does a 403 error often mean?
No index.html or wrong permissions. Check for index.html and set folders to 755 and files to 644.