You can buy domain names at more domain name registrars than I can list, and you can get free web hosting from more web hosting services than I can list. At least one registrar offers free domain names. You can even create unlimited subdomain names for a single domain name.
As far as I know, Freenom is the only domain name registrar dealing with free domain names and domain names at cost. The last time I renewed my domain name at Name.com, it cost me $14.99. Today, it would cost me $6.71 to get or renew a .net domain name at Freenom.
If it isn’t obvious, I plan to transfer my domain name to Freenom next year. That is, if I’m still using my domain name. I registered a few domain names at Freenom, using the free top-level domains, just for testing purposes.
Free web hosting with a service like Blogger is fairly easy to set up, but things are limited. You can’t use your own domain name unless you pay something every month. WordPress.com is the same way. Even Neocities is like that. If you search for them, you can find many more services like those.
I found a web hosting service that offered free space, but it shuts your account down for an hour every month. I found another one, InfinityFree that doesn’t appear to have any restrictions. The control panel bothers me, but that’s just me. I’m used to operating with Nginx instead of Apache and without a control panel of any kind.
If you haven’t guessed already, yes, I set up a test account with InfinityFree. I can’t write or talk about a service I’m completely unfamiliar with.
I don’t recommend free web hosting simply because your account can be discontinued, by them, for almost any reason and usually without recourse. It happened to a friend of mine who used Blogger. Luckily, he had a backup of all the data.
Shared hosting still exists, and it usually costs under $5.00 per month. Cloud hosting can be had for only a little more. I host with DigitalOcean, and it costs me exactly $5.00 per month. Vultr is another cloud provider with similar pricing. I’m sure I could find more if I was inclined to search for them.
When setting up DNS services and pointing domain names, there’s one subdomain name that’s usually automatically set up for you. If you use “www” in front of your domain name, that’s a subdomain. There are some services, where you route traffic through them, that require it.
The nice thing about subdomain names is they cost nothing to add or remove. You still have to wait for them to propagate through DNS, although it doesn’t take as long as your base domain names. I’ve used subdomain names for years when testing the waters, so to speak. This website is using the “blog” subdomain, with everything else redirected to it, including the bare domain name.
This is exactly how the free hosting providers work. It costs them nothing to add subdomain names to the existing domain names they already own. Search engines, like Google and Bing, treat subdomains exactly like they treat domains. It doesn’t make sense to obtain independent domain names when subdomain names will serve the exact same purposes.