Buy a domain, I got mine from google domains, they're pretty low cost, particularly for something unique.
Write your code. Make a git repo. Add all the HTML, CSS, JavaScript, PHP or images anything else you want to put on your webpage into your git repo.
Pick how you want to serve it, you may be able to serve it from home if your web provider allows for public IP use on a home router. Make sure you have the ports open on your local network topology. Alternatively AWS Lightsail is really low cost and easy to use.
Spin up an instance pick your OS, I'm using ubuntu 20.04. Go to the networking tab on the console and give it a static IP, you can have up to 5 static public IPs for free. You'll need a public IP to serve your content to the web. Set network rules, make sure ports 22 for SSH, 80 for HTTP and 443 for HTTPS, are open to both IPv4 and IPv6. SSH in, you can use their browser option or follow the instruction to use PUTTY or another SSH client.
Spin up an instance pick your OS, I'm using ubuntu 20.04. Go to the networking tab on the console and give it a static IP, you can have up to 5 static public IPs for free, pretty cool! Set network rules. This is only for serving a static site; if you are using any APIs or doing any file transferring on the same server you may have other ports you need to open.
Go to the AWS lightsail accounts page and then go to the SSH key tab.
Save the default key to Downloads.
Open terminal and input the following commands:
The output will be:
Run the command:
run the commands:
update the google domain with the static public IP wait for your site to go live.
get HTTPS with certbot.