HostedWebPage
Guide · 5 minutes

How to host an HTML file online for free

You have an .html file on your computer and want other people to open it with a link. This guide takes you from the file to a live website, including CSS, JavaScript and images.

.hostedwebpage.com
Free domain · HTTPS included · no credit card

Step 1: Start from one complete HTML file

The simplest page is a single self-contained file with its CSS and JavaScript inside it. Save it as index.html. Here is a minimal page you can use to test:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>My first page</title>
  <style>body{font-family:system-ui;max-width:40rem;margin:4rem auto;padding:0 1rem}</style>
</head>
<body>
  <h1>Hello, world</h1>
  <p>This page is hosted online.</p>
</body>
</html>

Step 2: Create a free account and a site

Sign up, open the dashboard and click New site. Type a name, then paste your HTML or use Import a file to load the .html from your computer. The original file name does not matter: the content becomes the main page of the site.

Step 3: Claim a free address

In the Free domain field, type the name you want. It is checked while you type, and https://yourname.hostedwebpage.com/ is yours once you publish. Choose Public so anyone with the link can open it, or Private to keep it to yourself.

Step 4: Add CSS, JavaScript and images

If your page links to other files, open Edit on the site and use Upload files. Files are served next to your page, so relative paths work exactly as they do on your computer:

  • <link rel="stylesheet" href="style.css">
  • <script src="app.js"></script>
  • <img src="images/logo.png" alt="Logo">

A folder with its own index.html, such as docs/index.html, opens at https://yourname.hostedwebpage.com/docs/.

Step 5: Update the page and keep the link

Edit the HTML at any time and save. The address stays the same, and every version is kept so you can restore an earlier one.

If something does not work

  • Images or styles are missing: check that the file is uploaded and that the path matches exactly, including upper and lower case.
  • The page is blank: open your browser's developer console and look for script errors.
  • The file is too large: the HTML page can be up to 5 MB and each extra file up to 4 MB.
  • A form should send email or save to a database: static hosting has no server code. Use the site's JSON document for simple data, or an external form service.

Why share a link instead of the file

A link opens in any browser with nothing to download, always shows the latest version and works on phones. HTML files sent as attachments are frequently blocked or stripped by email filters.

Good to know

Frequently asked questions

How do I host an HTML file for free?

Create a free account, click New site, paste or import your HTML file, claim a free address and publish. The page is live on HTTPS immediately.

Can I host an HTML file with CSS and JavaScript?

Yes. Put them inline in the HTML, or upload them as extra files and reference them with relative paths.

Does the file have to be named index.html?

No. The content you paste or import becomes the main page of the site, whatever the original file name was. Extra files keep their names.

Can I host HTML without a server?

Yes. That is what static hosting means: you upload files and they are served as they are, with no server to set up.

How do I update the page later?

Open the site in the dashboard, edit the HTML and save. The link does not change and the previous version stays in the history.

Can I keep the page private?

Yes. Set the site to Private and only you can open it, on the free address too.

Ready to host your HTML?

Pick a name. It is free, and it takes about a minute.

.hostedwebpage.com
Free domain · HTTPS included · no credit card