Subdomain Deployment Training Module

Hosting GitHub Pages on Your
GoDaddy Subdomain

A visual step-by-step roadmap showing exactly how to point subdomains like api.chelcamtech.co.za to your GitHub index.html files — no coding experience needed.

5 Steps Simple Process
500+ Subdomains Allowed
Live Site Production Grade
🌐 What is a Subdomain? (The Easy Explanation)
Think of your domain like a house's address. Subdomains are like the rooms inside your house.
📍 Anatomy of a URL — chelcamtech.co.za
Subdomain api.
+
Domain Name chelcamtech
+
Extension .co.za
=
Full Address api.chelcamtech.co.za

🏠 Your Main Domain

chelcamtech.co.za — This is your main house. Anyone who visits this sees your main website.

🚪 A Subdomain = A Room

api.chelcamtech.co.za can show a completely different HTML file than your main domain — it's like a separate room with its own door.

📊 GoDaddy Subdomain Limits at a Glance
How many subdomains can you realistically use on chelcamtech.co.za?
GoDaddy Plan Max Subdomains GitHub Pages Works? SSL (HTTPS) Free?
Basic / Economy 100–500+ ✔ Yes (via CNAME) ✔ Yes
Deluxe / Value 500+ ✔ Yes ✔ Yes
Domain-only (no hosting) 500+ ✔ Yes (DNS only) ⚠ Via GitHub
WordPress Managed 100 ⚠ Limited ✔ Yes

💡 Short answer: For chelcamtech.co.za on a basic plan, you can add dozens or even hundreds of subdomains — more than you'll ever realistically need.

🧱 The 3-Part Formula: GitHub → GoDaddy → Browser
Before we follow the steps, understand the three pieces that work together.
⚙️ Part 1 · GitHub

Your HTML Files Live Here

GitHub is a free website where you can store and host your HTML files. When you enable "GitHub Pages" on a repo, your index.html gets a live public URL like yourname.github.io/project.

Key thing: GitHub Pages is completely free and gives you a live URL for any HTML file you push to a repository.
🌐 Part 2 · GoDaddy DNS

Your Domain Points Here

GoDaddy controls where your domain name goes. Using something called a CNAME record, you tell GoDaddy: "When someone types api.chelcamtech.co.za, go to GitHub Pages instead."

Key thing: DNS is like a phone book. You add a record that says "this subdomain name = that GitHub address."
🖥️ Part 3 · GitHub CNAME File

Tell GitHub Which Domain

Inside your GitHub repo, you create a small file called CNAME (no extension). It contains just one line: your subdomain. This tells GitHub to accept traffic from that custom address.

Key thing: Without the CNAME file in GitHub, your subdomain will point to GitHub but show a 404 error page.
🗺️ Step-by-Step Process: Full Walkthrough
Follow these 5 steps in order. Each step builds on the last.
1
GitHub Setup

Create (or Check) Your GitHub Repository

Go to github.com and log in. Make sure you have a repository (a folder on GitHub) that contains your index.html file. If you don't have one yet, click the green "New" button and create a public repo. Upload your HTML file.

# Example repo structure:
📁 my-api-page/
  ├── index.html <-- your main page
  ├── style.css (optional)
  └── CNAME <-- you'll add this in Step 3
2
GitHub Pages

Enable GitHub Pages on Your Repository

In your repository on GitHub, click Settings → scroll down to Pages. Under "Source", select Deploy from a branch, choose main branch and / (root) folder. Click Save. GitHub will give you a URL like yourname.github.io/repo-name — this confirms it's live.

# Path in GitHub settings:
Repository → SettingsPages
Source: Deploy from a branch
Branch: main / root → Save
3
GitHub CNAME File

Add a CNAME File to Your Repository

In your GitHub repo, click Add file → Create new file. Name it exactly CNAME (capital letters, no extension). On the first line, type your subdomain address. Click Commit changes.

# File name: CNAME (no .txt or .html!)
# File contents (one line only):
api.chelcamtech.co.za

📝 One CNAME per Repo

Each GitHub repository can only have ONE custom subdomain. If you have 5 different HTML projects, you need 5 separate repos — each with its own CNAME file pointing to a different subdomain.

4
GoDaddy DNS

Add a CNAME Record in GoDaddy

Log in to GoDaddy.com. Go to My Products → DNS (or Manage DNS next to your domain chelcamtech.co.za). Click Add New Record and fill in these values:

Type: CNAME
Name: api        ← just the subdomain word, not the full domain
Value: yourname.github.io ← your GitHub Pages URL (no https://)
TTL: 1 Hour (default is fine)

Click Save. GoDaddy will save this DNS record. DNS changes can take up to 48 hours to go live worldwide (usually much faster — under 30 minutes).

5
Final Check

Enable HTTPS in GitHub Pages (Free SSL)

Go back to your GitHub repo → Settings → Pages. In the "Custom domain" box, you should see your subdomain is saved. Wait a few minutes, then tick the box labelled "Enforce HTTPS". This adds the padlock 🔒 to your URL for free.

# Final result:
🔒 https://api.chelcamtech.co.za → shows your index.html ✔
➕ Adding More Subdomains (Repeat the Pattern)
Each new project needs its own GitHub repo and one new DNS record in GoDaddy.
🔁 One Subdomain = One GitHub Repo + One GoDaddy DNS Record
Subdomain 1
api.chelcamtech.co.za
→ Repo: my-api-project
CNAME: api.chelcamtech.co.za
Subdomain 2
shop.chelcamtech.co.za
→ Repo: my-shop-page
CNAME: shop.chelcamtech.co.za
Subdomain 3
docs.chelcamtech.co.za
→ Repo: my-docs-site
CNAME: docs.chelcamtech.co.za
Subdomain N…
anything.chelcamtech.co.za
→ New Repo + New DNS record
Repeat the 5 steps ♾️
🛠️ Common Problems & Quick Fixes
Something not working? Check these first before panicking.
Problem Why It Happens Fix
404 Page Not Found GitHub repo has no CNAME file, or your HTML file isn't named index.html Add the CNAME file to your repo with exactly your subdomain on line 1. Rename your main file to index.html.
Subdomain still goes to GoDaddy page DNS hasn't updated yet (can take up to 48h) Wait up to 24–48 hours. Usually under 30 min. Clear your browser cache or test in incognito mode.
No padlock / HTTPS error "Enforce HTTPS" not yet enabled, or DNS is still propagating Wait for DNS to settle, then go to GitHub → Settings → Pages and tick "Enforce HTTPS".
CNAME value wrong in GoDaddy The Value field should be yourname.github.io — not your full repo URL Edit the CNAME record. Value = yourname.github.io only. Do not include https:// or the repo name.
Two subdomains pointing to same page Two repos with the same CNAME file content Each repo needs a different subdomain in its CNAME file.
✅ Quick Reference Checklist
Tick all of these off before you say "it's done".
📋 GitHub Side

What must be in GitHub

  • Repo is set to Public
  • File named exactly index.html in root
  • GitHub Pages enabled on main branch
  • CNAME file added with your subdomain
  • "Enforce HTTPS" ticked in Pages settings
🌐 GoDaddy Side

What must be in GoDaddy DNS

  • Record type = CNAME
  • Name = just the subdomain word (e.g. api)
  • Value = yourname.github.io
  • !
    Value does NOT include https://
  • !
    Value does NOT include your repo name
⏱️ Timing Tips

How long does it take?

  • GitHub Pages goes live in ~2 minutes
  • GoDaddy DNS change: 5–60 minutes usually
  • !
    Worst case DNS: up to 48 hours
  • HTTPS certificate: granted in ~15–30 min after DNS settles
  • Always test in Incognito mode first