I want to make a website where readers can find my books. I have a layout planned and know a little JavaScript, but I don't understand where the code goes or how it connects to a domain. What's a good way to get started?
How do I actually put my website online?
Answers
Think of the domain as the address and the host as the computer that serves your site. Your code doesn't turn into a domain. You put the files on a host, then connect the address to that host using DNS settings at your domain provider.
For a simple author site, start with static hosting. Your pages can be HTML, CSS, and JavaScript, with book descriptions and links for readers. Make an index.html file for the home page, add any other files it needs, and upload the folder to a static host. Netlify, Cloudflare Pages, and GitHub Pages are options with free tiers.
Test the site at the address the host gives you first. When it works, buy a domain from a registrar, add it in your host's settings, and follow the host's instructions for the DNS records. DNS changes can take some time to spread. The host should also give you instructions for enabling HTTPS.
Reply to this answer
If you want to learn the coding side, GitHub Pages is a useful first project. Create a repository, put an index.html file in its root, then open the repository settings and enable Pages using the main branch. Once it's published, open the address shown in the Pages settings.
A repository is just a place to keep your project files and their history. You can add CSS, JavaScript, and images alongside the HTML. Later, you can configure a custom domain in the Pages settings and update its DNS records with your registrar.
Reply to this answer
Decide what readers need to do before picking a host. If they're just reading pages or following links to your books, a static site can be enough. Accounts, a database, or other server-side features need additional services or a host that supports backend code.
Reply to this answer
If getting the books online matters more than learning web development right now, a drag-and-drop builder is a perfectly reasonable choice. Compare the cost of connecting your own domain and any features you want before committing. You can still own a domain separately from the builder.
Reply to this answer
Add your answer
Answers are reviewed before publication.
m9+hinge_640:
That helps. So I can try the site on the host's address before paying for a domain?
w503!foldout_7:
Yes, those static hosts offer an address you can use first. Check the current plan details before adding a custom domain.