Put an HTML file online and get a link
An HTML file on your computer opens fine for you, but a link like
file:///Users/you/page.html only works on your machine. To share it, the file has to live on a web
server. That takes a few minutes and doesn't need to cost anything.
The quick way
- Create a free Pagehaus site. Pick a name: your link will be
https://yoursite.pagehaus.site/. - Rename your file to
index.html. That's the page a web server shows when someone opens the address without a file name. (Or keep the name, and the link becomeshttps://yoursite.pagehaus.site/yourfile.html.) - On your site's Files tab, drag the file onto the page. It's online straight away, over HTTPS.
If the page has images or a stylesheet
Upload them too, in the same folders as on your computer. Your page refers to them by name, for example
<img src="images/logo.png">, so images/logo.png has to exist on the site as
well. The easiest way is to put everything in one folder and drag the whole folder, or a .zip of it, onto the
Files tab.
Image missing once it's online? Check the capitals: web servers treat Logo.PNG
and logo.png as different files, even if your computer doesn't. Also look for links that start with
C:\ or file://: those point at your computer, not the site.
Updating it
Upload the new version with the same name and it replaces the old one. The link stays the same, so anyone you sent it to sees the update. You can also edit the file in the browser on the Files tab. Every change is kept in version history, in case you want the old one back.
Things a single HTML file can't do on its own
- Receive form messages: point the form at
/_form/contactand Pagehaus emails them to you. See contact forms. - Stay private: anyone with the link can open it. On Personal and Pro you can add a password.
- Run PHP or a database: Pagehaus hosts plain HTML, CSS, JavaScript and files. If your page needs a server program, it needs a different kind of hosting.
Your own address
On a Personal or Pro plan, connect a domain such as yourname.com and the same files appear there,
with HTTPS set up for you (how).
Want to know what else is out there? Free static site hosting compares the free options.