Making a free website
Posted on 10 June 2023
So, you want to make a website, but you're unsure how to actually get it hosted on a domain. Don't worry if that's the case, because in this guide I'll talk about a few of my favorite website providers (that are completely free, no ads)!
Making the site
You must learn how to make the site before you can host it. You should learn HTML (the text of the site), CSS (the style of the site), and optionally JavaScript (the functionality) and/or Markdown (an easier way to write the text of the site). Here's my reccomended resources for each:
- HTML: Neocities HTML course (requires login), MDN course
- CSS: MDN course
- JS: MDN course
- Markdown: Markdown guide
- If you're using Markdown, you'll need to "compile" it to HTML before you can use it online. Luckily, there are many sites that do this for free, and you can use this tool I made to do it as well!
I reccomend always having MDN open while you make your site, as it's a wonderful reference if you get confused. (I've been doing this for a decade and I still visit MDN whenever I make sites!)
However, that's not all. You also need a good editor to make your site without your brain exploding (figuratively). I reccomend Sublime Text for all four. (If you're a Linux nerd like me, your default text editor should already support syntax highlighting, so you won't need to worry about that unless you want to.)
Content hosting
There are two parts to hosting a site once you have the content: the content hosting and the domain name. Domain names are usually cheap (10€ per year!) but hosting is usually six times that cost yearly. However, you can get (static) website hosting for free! (Static meaning no backend, which really isn't too much of a loss, since you can still use JavaScript on static pages.)
Neocities (easiest)
Neocities is the easiest option for most people. One signs up, uploads their HTML files (and anything else), and the website is ready at [account name].neocities.org. Neocoties supports custom domains under the 5€/month Supporter tier, but you can still have a website for free on Neocities.
Codeberg Pages (best for people who know Git)
If you're not afraid to learn how to use Git, Codeberg Pages is an excellent option. (Or you could do GitHub or GitLab pages, but both GitHub and GitLab have ethical issues, so I'm not covering them in this guide.) Simply create a Codeberg account, and the a repository named pages
, and insert all your HTML files and whatever else there.
Custom domains
Codeberg Pages supports custom domains. To have a custom domain, add a CNAME record to your subdomain (I am not covering root domains because you cannot get those for free legitimately) that directs to your Codeberg page URL. (t.ex. if my subdomain was free.turtle.garden
, I could do CNAME free.turtle.garden turtle.codeberg.page
.) Then, make a file .domains
in the root repository directory that has only your custom domain name in it. It should work when pushed to Codeberg. If you can't do CNAME, do an A record to 217.197.91.145
, an AAAA record to 2001:67c:1401:20f0::1
, and a TXT record with your Codeberg page domain name (not your custom domain).
Domains
Finally, domains. Domains are what you type in the address bar to visit a site- this site's domain is md.turtle.garden. A domain with only one dot in it (excluding the dot in the middle of .co.uk, .co.in, etc) is called a domain; if it has more than one dot, it's called a subdomain. You can get free subdomains with a variety of services, but this is my favorite one.
FreeDNS
FreeDNS allows you to get subdomains for free, provided you log in every so often to show you're not a spambot. To use it, sign up (warning: captcha) and you'll be taken to an empty screen. Click Registry on the side and search for a domain you like, click it, and you'll be taken to the Add Record screen. Let's say you chose honeybeegardens.net
(which is a domain you can choose there). If you put lovelycrocus
into the Subdomain field, the domain which that record would be for would be lovelycrocus.honeybeegardens.net
. The Destination field speciefies where the record will point to (for an A record, an IPv4 address; for AAAA, an IPv6 address; and for CNAME, another domain.) (Some domains may not support CNAME here.) You can set up many records on one subdomain, so don't worry about running out of records. (f.ex. turtlepond.honeybeegardens.net
is an alternate domain for paddmark (this website).)
So now you know how to make your own website, completely free! Let's take the Internet back from the corps together.