This Article IsCreated at 2024-04-24Last Modified at 2024-04-25Referenced as ia.www.b52

Experiences With Static Site Hosting Providers

pages.sr.ht

Publishing on pages.sr.ht is easy. To do that, simple use their CLI tool:

hut pages publish ./dist/ -d 'example.com'

However, the CSP there does not allow window.alert or window.prompt, which makes some applications fail silently. Here is the whole list of limitations.

Price-wise, $20/year is a bargain. This is also the most bloat-free solution for site hosting you will find, although incremental upload is not yet supported, so if your site is big it will take some time to upload.

If you have the resources to do so, you can fork pages.sr.ht to get rid of the CSP restrictions.

vercel

I feel like vercel doesn’t really care about static sites. To publish a static site, you need to copy the build directory to .vercel/output/static and run vercel deploy --prebuilt --prod. If that doesn’t work, run vercel build and set the build commands to true.

To add your own domain, you need to use their web UI.

netlify

To deploy a folder of files on netlify, do:

ntl deploy -d _site --prod

To add your own domain, you need to use their web UI, and click the “I want to add this domain” button twice. Also, netlify doesn’t seem to understand the difference between www.example.com and example.com. I gave up trying to figure out how to make netlify understand that www. is a subdomain.