How to Host a Simple HTML Website Using Netlify, GitHub, and Namecheap with SSL
How to Host a Simple HTML Website Using Netlify, GitHub, and Namecheap with SSL
Owning a custom domain like my-business-name.website (cost: USD 1.18 / INR 106.28) is just the first step. Hosting your website securely with SSL and making it accessible online requires a few more steps. This guide will walk you through hosting a simple HTML website using GitHub, Netlify, and Namecheap.
Step 1: Prepare Your Website
-
Create a folder on your computer for your website, e.g.,
my-business-site. -
Inside the folder, create an HTML file (
index.html) with your content:
<!DOCTYPE html>
<html>
<head>
<title>My Business Website</title>
</head>
<body>
<h1>Welcome to My Business!</h1>
<p>This is a simple HTML website hosted on Netlify.</p>
</body>
</html>
-
Optionally, add CSS (
style.css) or JavaScript (script.js) files.
Folder structure example:
my-business-site/
├── index.html
├── style.css
└── script.js
Step 2: Upload Your Website Code to GitHub
-
Create a GitHub account if you don’t have one: https://github.com.
-
Click “New Repository” and name it, e.g.,
my-business-site. -
Open Git Bash or terminal on your computer and navigate to your website folder:
cd path/to/my-business-site
-
Initialize Git, commit, and push your files to GitHub:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/<your-username>/my-business-site.git
git push -u origin main
-
Your website is now hosted on GitHub.
Step 3: Deploy Your Website on Netlify
-
Sign up or log in to Netlify.
-
Click “Add new site” → “Import from Git”.
-
Choose GitHub and authorize Netlify to access your repositories.
-
Select your repository (
my-business-site). -
Configure deployment:
-
Build command: Leave empty for simple HTML.
-
Publish directory:
.(root folder containingindex.html)
-
-
Click Deploy site.
-
Netlify will assign a temporary URL like
https://random-name.netlify.app.
Step 4: Configure Your Namecheap Domain
-
Log in to Namecheap → Domain List → Manage → Advanced DNS.
-
Add a CNAME record:
| Host | Value (Target) | TTL |
|---|---|---|
| www | your-netlify-site.netlify.app | Automatic |
-
Optional: Set up URL redirect to redirect
my-business-name.website(root domain) towww.my-business-name.website.
Step 5: Add Custom Domain on Netlify
-
Go to your Netlify site → Domain settings → Add custom domain.
-
Enter
www.my-business-name.website. -
Netlify will verify the DNS settings and link your domain.
Step 6: Enable SSL (HTTPS)
-
In Netlify → Domain settings → HTTPS → Click “Provision certificate”.
-
Netlify uses Let’s Encrypt to provide a free SSL certificate.
-
Wait a few minutes. Your website will now be accessible securely:
https://www.my-business-name.website
Step 7: Test Your Website
-
Open your browser and visit your domain.
-
Verify:
-
Website loads correctly.
-
https://is active and secure. -
All links, images, and CSS are working.
-
Optional: Configure Root Domain
To make your site accessible without www:
-
Add an A record in Namecheap pointing to Netlify’s IP addresses (found in Netlify domain settings).
-
Alternatively, keep
wwwas primary and redirect root domain towww.
Summary
-
GitHub: Stores website code.
-
Netlify: Deploys and hosts your website, provides SSL.
-
Namecheap: Provides the domain name and DNS management.
-
SSL Certificate: Ensures secure HTTPS connection.
Following these steps, your simple HTML website is now live, secure, and accessible via your custom domain.

Comments
Post a Comment