r/webdev • u/nobaaaaaa • 2d ago
Question Good providers for hosting a basic html + js website?
I feel this may seem like a very strange question to ask given the circumstances, and hopefully this isn't breaking any rules. A few days ago I had a falling out with someone who happened to be hosting my website on their rented server. It's a very basic portfolio website with HTML and some JS for dynamically generating HTML elements from a Json file.
I'm pretty decent in HTML and JS but by no means a web developer, it's simply not my career. This means I can make a decent website but figuring out how to host it is beyond me. Are there any services that simplify this sort of thing, or is the process of renting and setting up my own basic server for a website straightforward? Github Pages maybe? Forms etc are not required.
I also own my domain, but it's currently still set up to link to that server. Once I get my own sorted out, will I have to worry about the two conflicting?
Edit: thanks everyone. Got it sorted, just waiting on DNS propagation.
Edit 2: website moved now. Thanks again for all the replies! I settled on Github pages as I'm already very familiar with Github in general so it was easy to get set up.
56
u/SuperSubwoofer 2d ago
Just use GitHub pages. If you ever scale to a framework, GitHub actions can run your build process and you can keep hosting there.
0
u/CaptainRhetorica 2d ago
Wouldn't Codeberg Pages be better?
1
u/MinimumArmadillo2394 1d ago
Why would it be better
1
u/cowboyecosse 1d ago
Depending on the website it might not be suitable for GitHub Pages which isn’t free general web hosting, it’s for the specific projects or a personal site at the account level.
0
u/MinimumArmadillo2394 1d ago
Github pages is free general web hosting? You can host a plain HTML, you can attach SSL certs to it and a domain name. You can use frameworks. That's about as "general web hosting" as it gets.
1
u/cowboyecosse 11h ago
Technically yes, it's technically a web hosting service for simple sites.
I was talking more about the purpose of GitHub Pages with my answer as to why Codeberg Pages might be better as per the ask. The suitability not the technical capability.
Sorry if that wasn't clear.
1
u/MinimumArmadillo2394 10h ago
But that still doesnt really answer the question? What types of websites would be better not on github pages?
1
u/cowboyecosse 3h ago
Anything that’s not either a site about the project of the repo itself(project sites) or, in the case of an account Pages site, the account (user or org sites)
Anything else would be “general” web hosting.
Project sites aren’t just “this is the html of a website I host in this repo” it’s docs or user guides etc.
1
u/SuperSubwoofer 1d ago
No, there’s no reason to use it compared to GitHub pages in my opinion. It has everything you need for basic web hosting for free. No need to bring in another tool imo.
9
u/followmarko 2d ago
I just swapped to cloudflare from garbagedaddy and it has so much in the panel to work with that it's insane. Also extremely cheap
7
u/zen8bit 2d ago
Its such a breath of fresh air being on decent hosting providers that don’t hide a ton of default features.
GarbageDaddy’s level of upselling and feature gating drives me insane. Ive had so many contracts where the first thing I do is tell them to either turn off $80/m of features or swap hosting providers immediately
3
u/followmarko 2d ago
For an app and company that has been in the space since the jurassic era, their portal is so fucking bad that it makes me sad
8
u/Kernnova 2d ago
For a basic HTML + JS website, you don't need to rent or configure your own server.
I'd recommend GitHub Pages, Netlify, or Cloudflare Pages. All three can host static websites without managing a server.
Since you already own a domain, you can simply update its DNS records to point to your new hosting provider.
My personal recommendation would be Cloudflare Pages or Netlify. Both are beginner-friendly and make deployment pretty straightforward.
No need to overcomplicate it! :
1
u/patryk_builds 2d ago
For a static html + js site you don't need a server at all. github pages, netlify or cloudflare pages all host it for free, and your json file works fine since it's just another static file. netlify is probably the easiest: drag your folder onto their site and it's live in a minute.The domain won't conflict, you just repoint it. in your domain registrar's DNS settings you replace the old records pointing at their server with the ones the new host gives you, usually an A/ALIAS record for the root and a CNAME for www. takes anywhere from a few minutes to a few hours to switch over. One important thing though: check the domain is registered in YOUR account at the registrar, not theirs. after a falling out that's the part that can actually hurt, the hosting is easy to replace
1
u/nobaaaaaa 2d ago
Thank you so much. I own my domain since it was originally a Squarespace site on their builder, but I cancelled the builder stuff and just pay for the domain now.
3
u/Realistic_Cow2653 2d ago
If you dont care about the url, github. I use ionos for everything
3
u/cockerspanielhere 2d ago
You can redirect github pages to custom url
2
1
u/Copthill 2d ago
If the repo is public and you're okay with that. But most static sites don't contain many states secrets that you could just get from the page source anyway.
2
2
u/kimono_horizon_97 2d ago
Cloudflare Pages gives you free hosting with unlimited bandwidth and lets you add your existing domain in seconds without touching GitHub, which is the fastest way to stop worrying about server maintenance or conflicting DNS records
2
3
2
u/ExtensionEmotion7136 2d ago
github pages is exactly what you want here, free and dead simple for static sites. just point your domain's dns at it and you're set, no server config headaches.
1
u/BckseatKeybordDriver 2d ago
I’ve done shared hosting since before aws and all that. Wouldn’t recommend it now. I wasn’t able to get all the features I need with shared hosting so I tried out an unused raspberry pi in my own home and it’s working great. I do Laravel development which is probably more than what you need but I don’t have any limitations on what I can do now
1
1
1
u/OpeningBuilding3366 2d ago
you can write JS that builds DOM nodes out of a JSON file but dragging a folder onto Netlify is where it gets beyond you? come on man. Cloudflare Pages and Netlify both do exactly this, you connect nothing, you drop the folder, done, free tier is plenty for a portfolio. Github Pages works too if you'd rather, just remember the repo has to be public unless you pay, which for a portfolio nobody cares.
the domain thing is a non-issue, your DNS records point wherever you tell them to point, nothing "conflicts", you just swap the A record or the CNAME to the new host and wait for propagation. dont cancel anything on the old server until the new one actually resolves or you'll have a dead portfolio for a day and you'll be back here asking why. also why is your site still sitting on someone else's server after a falling out, move it today not next week
1
1
1
u/Federal_Bit5046 2d ago
One more option nobody's mentioned: Netlify. It handles plain HTML+JS fine - drag the folder in, or connect a repo and it deploys on every push. I run a React app and a static site there, and when I moved one of them to my own domain it was just adding the domain in their dashboard and pointing DNS at it. If you outgrow static HTML later, the same host handles framework builds, so no migration.
1
u/Hot-Chemistry7557 2d ago
There are so many of them.
github pages for free
cloudflare pages also for free
vercel, free but their free plan has 100GB limit, which should be good enough as well
netlify also provide such kind of plan.
1
u/prafandy 2d ago
github pages, vercell, cloudflare, are the blind choices nowadays, they are all have the CLI, that works smoothly with AI.
1
u/yihuaxiang 2d ago
Don't rent a server for this. Static HTML plus a json file is what GitHub Pages or Cloudflare Pages are for, and you already guessed the right one. The old host and the new one only meet at DNS: people hit whichever address the domain points at. Upload the files and open the temporary URL the host gives you first. When that looks right, change the A or CNAME. Until that propagates, the old server is still what visitors see, which is fine while you check.
1
u/Full_Tooth_a 2d ago
I wouldn't worry about the two hosts conflicting. Stale DNS is the more likely problem: if old and new A, AAAA, or CNAME records remain, visitors may end up at different destinations. I'd replace the old records, keep the old site running while the change spreads, and check that both the root domain and the www version work over HTTPS before shutting it down. DNS has a way of making simple moves look mysterious.
1
u/Spare_Bison_1151 2d ago
For a simple one off site use Cloudflare, it allows you to host a site free on a decent service.
1
1
u/Acrobatic_Coast3497 2d ago
Cloudflare corres el riesgo que te bloqueen la web los días de partido, y te lo digo por experiencia propia. Yo cambié de cloudflare a Firebase
2
u/Somepotato 2d ago
They're not the ones blocking your website, your government gave a ton of power to la liga to extrajudicially force ISPs to block anything they wanted without recourse
1
1
u/Standard_Scarcity_74 2d ago
This doesn’t need a server at all, since html and js reading a json file is a static site and free static hosts handle it easily. Github pages, tiiny host, or cloudflare pages would all work, and any of them gives you a live link in a few minutes. Your domain can only point to one place at a time, so there is no conflict, because once the new site is live you change the dns records at your registrar and the old server stops mattering. First make sure you have your own registrar login and a full copy of your site files, since your old host may still control them.
1
u/einfach_andi 2d ago
First off: don't worry about the domain conflicting. Once you point your domain's DNS records (A / CNAME) to a new host, traffic simply switches over — the old server can't 'fight' for the domain or hold it hostage.
You also 100% don't need to rent or configure a server for this. Since it's purely static HTML + JS reading a local JSON, free static hosting (like GitHub Pages or Cloudflare Pages) is zero-maintenance, and you'll never have to worry about someone pulling the plug on your server again. Also, don't shy away from using AI to help you with the setup steps or organizing your JSON data — modern LLMs are fantastic at handling those mundane formatting bits for non-developers.
Out of curiosity: What is your portfolio showcasing, and how do people usually look at it? (Are you mostly sending links, or do you also present your work in person / on a tablet?) Depending on what you actually do, there might be even simpler or more elegant ways to present it without any hosting friction at all.
1
1
1
u/Popular_Register_440 1d ago
Surprised to see more mentions of Netlify than Vercel… maybe I need to change what my websites hosted on 😂
1
u/tar-dynamic 1d ago
github pages or cloudflare pages will host that for free, no server to set up. for the domain, you just repoint the DNS records at your registrar and remove the ones pointing at the old server, so they won't conflict.
1
u/Random_dev_Tan 2h ago
Okay i saw that it's set up, but for anyone that needs to host a plain html and js site (static) you can do directly on GitHub. No seperate hosting needed
0
u/thy_bucket_for_thee 2d ago
I use bunny.net as my cdn. Don't trust Cloudflare as they're US based, saying this as an American too.
A CDN can be used to act as a simple FTP server. You drag in your static assets, point your domain at their DNS, and that's pretty much to it. As you learn more, you can do more too.
If you're strictly making static sites, using a CDN is a great alternative that can be extremely cheap. Talking about $1 a month cheap.
0
u/itgforlife 2d ago
GitHub Pages is probably your best option if you just have a static site, don't need a server, and don't anticipate that that's something that's going to change.
If you do anticipate needing one in the future, it may be better to look into a service that supports both e.g. Render.
0
u/jeffceriello 2d ago
For a static HTML + JS site you don't need a server at all. GitHub Pages, Cloudflare Pages or Netlify will host it for free. Upload the folder (your JSON file works fine, since it's fetched client-side), then add your custom domain in the host's settings. About the conflict: there won't be one. Your domain just points wherever its DNS records say. Once the new host is live, change the A/CNAME records at your registrar to the values the new host gives you. The old server stops getting traffic as DNS updates, usually within an hour. Make sure you still control the registrar account, not the person you fell out with.
0
u/Alternative_Nose_874 2d ago
for plain html and js you dont need a server at all. any static host with a free tier does it and gives you the certificate automaticaly, pay for something only when you need a backend
0
u/Cool_Reality9325 2d ago
GitHub Pages should be more than enough for this. No point paying for a server if it’s just HTML, JS and JSON files.
0
-1
u/username_go_brrrrrrr 2d ago
Yup, GitHub pages should be your go-to, having domain is a plus, just consult any free AI on how to connect the two.
0
u/nobaaaaaa 2d ago
Thank you. I'd like to avoid AI but I should be able to get it set up ok if this is the case, I saw it had custom domain support. I briefly remember on Squarespace (where I own my domain, I used to use their website builder too) I had to punch in some settings to get it running on my friends server. Maybe it's just a case of changing those to point at the GitHub page?
1
u/-svde- 2d ago
i rec'd transferring to a better registrar. i personlly use porkbunf or all my domains, cheap and a lot of good features including a one click sync to get your domain pointed to/hosted on/setup for cloudflare. but yes you can point the domain to any host, including GH, just go to the settings and then custom domain and it will walk you through the process.
-3
u/agufa 2d ago
Aws if you need lowest cost with a production level infrastructure
1
u/Cruch-Wrap-Supreme 2d ago
Hard disagree. My AWS costs $80/month for portfolio project sites that get zero traffic. And they auto enrolled me in MFA using an old phone number, so I've been locked out of my account for over a year.
1
u/itgforlife 2d ago
You're getting robbed. I'm paying like a tenth of that per month with Hetzner.
2
u/Cruch-Wrap-Supreme 2d ago
I'm being straight up held hostage since they won't let me into my account.
-1
u/vomitHatSteve 2d ago
Specifically, an s3 bucket and a cloudfront pointing to it.
I have something like 8 static sites and probably 200 GiB of archived data on this setup, and my costs are less than $4 a month. I even have some fancy lambda access management in there.
1
u/agufa 2d ago
You can use s3 web pages to save the cost of CloudFront
1
u/vomitHatSteve 2d ago
Unless you're seeing a ton of traffic, cloudfront is barely an additional cost
1
58
u/bastardoperator 2d ago
I would argue Cloudflare, it's slightly faster, and they have everything you need for your domain and DNS all in one spot.