how to get hosting for free ?
I don’t any to recommend specifically, but a google search of “free web hosting” will give many responses. Of course, with free hosting you will have limited features, bandwidth, diskspace, or have advertising usually. Of course, there are also some very cheap web hosts. I use bluehost and am actually hosting three domain names off the same account.
If you’re going to host a fully static site or a single-page application with a RESTful API backend (either done by hand or with the help of a static site generator) I’d recommend Netlify or Surge.
If you require a place to host a dynamic site with a web framework or a restful API then Heroku is a place to start.
Otherwise get some $ and pay for a cheap 5$ VPS at DigitalOcean or Linode.
You can always make use of the free tiers of something like Firebase depending on your needs. An S3 bucket on AWS would also work.
Another options if to use Netlify for it. I have my portfolio hosted on their for free and am just using the standard domain they provide. Nice, easy way to host something.