logoalt Hacker News

rich_sashatoday at 6:21 AM10 repliesview on HN

A few comments point out, and I agree, that setting up, never mind maintaining a webpage, has become a PITA:

- server (AWS? 10 optional services to config etc etc, config, updates etc)

- domain

- SSL cert

Are there solid providers who do it all-in-one? I pay one bill, get a domain, SSL certificate, renewed, and a managed, pre-configured Linux box, or even static hosting? Thinking of setting up a webpage for my consulting business and I'd rather not spend weeks fiddling with all this, or (shudder) use Wix.


Replies

joramstoday at 8:50 AM

Literally type "webhosting" into a search engine and every single provider that comes up will do that all-in-one. They'll also throw in a database and PHP, probably with an automatic installer for things like WordPress. There's a good chance your registrar will even try to upsell you the whole package.

These things are not the hard part.

ctmlrtoday at 7:30 AM

Backblaze offers 10 GB of free storage and CloudFlare offers free data transfer from B2, with these two you can host a static site for free. I have a worker script that routes requests to the index page and sets cache headers for my site.

  export default {
    async fetch(req, env, ctx) {
      // Cached response
      let res = await caches.default.match(req);
      if (res) return res;
  
      // Fetch object from origin
      let reqPath = new URL(req.url).pathname;
      reqPath = reqPath.replace(/\/$/, ''); // Remove trailing slash
      if (!reqPath.includes('.')) // Check file extension
        reqPath += '/index.html'; // Default to index page
  
      res = await fetch(env.ORIGIN + reqPath);
      if (res.status === 404) // Object not found
        res = await fetch(env.ORIGIN + '/404.html');
  
      // Configure content cache
      res = new Response(res.body, res);
      const ttl = res.headers.get('content-type').startsWith('text')
        ? 14400 : 31536000; // Cache text 4 hours, 1 year default
      res.headers.set('cache-control', 'public, max-age=' + ttl);
  
      // Cache and return response
      ctx.waitUntil(caches.default.put(req, res.clone()));
      return res;
    },
  };
jcgltoday at 9:09 AM

Static hosting is amazing for toooons of use-cases. Especially those where You Just Need A Website (business hours, contact info, general info).

tasukitoday at 7:01 AM

You can use GitHub pages. Or just set up one virtual server and host everything on it - I do that and it's pretty painless. The "10 services on AWS" is definitely the most painful way there is.

hvb2today at 6:53 AM

I have actually been experimenting with this. And it's real simple.

I think for these cases everyone should be shooting for a static site. In which case it is: 1. Rent a vps 2. Buy a domain 3. Set up nginx or something else 4. Copy files to the right folder 5. Point a dns record to said server 6. Use certbot to get an ssl cert installed for you

It's not that hard really.

show 1 reply
pprotastoday at 6:27 AM

This has always been the case, not sure why you’d frame it as a recent development. Not that long ago you even had to PAY for an SSL cert. Domains are nothing new. You always needed a server.

show 1 reply
Aldipowertoday at 8:09 AM

Netcup, Hetzner, Strato, OVH, Ionos, ...

sofixatoday at 6:49 AM

Providers like Netlify, Firebase Hosting, CloudFlare are much better value for money for features for maintenance. Static hosting means you don't need to update the server because there isn't one, and there are even free tiers below a certain usage.

There's still the usability thing, they're not made for non-techies. There's an assumption you'll use Git, etc. But there's no practical reason why Netlify CMS or similar couldn't handle everything.

orthecreedencetoday at 6:29 AM

NearlyFreeSpeech might be what you want. Been using them for over a decade and still love them. They handle domains/DNS, hosting (static and other), mysql hosting, email forwarding, and much more. They also have great content policies, ie they only kick you off if you're breaking the law.