Introduction
Aapne apni HTML, CSS aur JavaScript se ek website bana li?
Ab chahte hain ki duniya usse online dekhe — वो भी बिल्कुल फ्री में?
To jawab hai: GitHub Pages!
Is guide me aap sikhenge:
- GitHub Pages kya hai?
- Kaun si website aap host kar sakte ho?
- Step-by-step process (screenshots ke bina bhi clear hoga)
- GitHub Desktop ya command line dono se kaise karein
GitHub Pages क्या है?
GitHub Pages ek free hosting service hai jo aapko GitHub par stored static websites ko live URL ke saath public karne ka moka deti hai.
Key Features:
- 100% free
- No credit card needed
- Perfect for static websites (HTML, CSS, JS)
- Live preview with custom URL like:
https://username.github.io/your-repo-name/
Requirements:
- GitHub account (https://github.com/)
- Basic knowledge of Git + version control
- Aapki static website (HTML/CSS/JS files)
Step-by-Step: Website GitHub Pages पर Host कैसे करें?
🔹 Step 1: GitHub par Account banayein (अगर नहीं है)
- Visit: https://github.com
- Sign up करें aur email verify करें
🔹 Step 2: New Repository Create करें
- GitHub login करें
- “New Repository” पर क्लिक करें
- Repository name:
your-project-name
- Keep it public
- “Initialize this repository with a README” option select करें
- Create Repository
🔹 Step 3: Apni Website Files Upload करें
Option A: GitHub Web UI se
- “Add file” → “Upload files” पर क्लिक करें
- Apne
index.html
,style.css
, etc. files drag and drop करें - “Commit changes” पर क्लिक करें
Option B: GitHub Desktop ya Git CLI
bashCopyEditgit clone https://github.com/username/repo-name.git
cd repo-name
# apni website files yahan copy karein
git add .
git commit -m "Add website files"
git push origin main
Step 4: GitHub Pages Enable करें
- Repository ke andar
Settings
me जाएं - Left side menu me “Pages” tab पर क्लिक करें
- Source dropdown me
Deploy from a branch
select करें - Branch:
main
, folder:/root
- Save कर दें
* Ab aapko ek live URL milega:https://your-username.github.io/your-repo-name/
Bonus: index.html
जरूरी क्यों है?
- GitHub Pages by default index.html file ko landing page मानता है
- Agar aapne
index.html
nahi diya to website render nahi hogi
Tips & Best Practices
- File names case-sensitive hote hain (e.g.,
style.css
≠Style.css
) 404.html
add karna helpful hota hai for error pages- Aap
CNAME
file use karke custom domain bhi connect kar sakte hain
GitHub Pages पर क्या Host कर सकते हैं?
Ho Sakta Hai | Nahi Ho Sakta |
---|---|
HTML/CSS/JS Websites | PHP, MySQL |
React Apps (build folder se) | Node.js Server |
Documentation sites (Jekyll) | Server-side code |
Conclusion
Aapne seekh liya kaise:
- GitHub par repo banate hain
- Apni website ki files upload karte hain
- GitHub Pages par ek free live URL milta hai
Toh ab intezaar kis baat ka? Apni website duniya ke saamne laayiye — bina ek rupaye ke!
Agar aap React, Vue, ya custom domain ka setup chahte hain, comment karke zaroor batayein.