GitHub Pages पर Website कैसे Host करें? पूरी जानकारी हिंदी में (2025)

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 (अगर नहीं है)


🔹 Step 2: New Repository Create करें

  1. GitHub login करें
  2. “New Repository” पर क्लिक करें
  3. Repository name: your-project-name
  4. Keep it public
  5. “Initialize this repository with a README” option select करें
  6. Create Repository

🔹 Step 3: Apni Website Files Upload करें

Option A: GitHub Web UI se

  1. “Add file” → “Upload files” पर क्लिक करें
  2. Apne index.html, style.css, etc. files drag and drop करें
  3. “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 करें

  1. Repository ke andar Settings me जाएं
  2. Left side menu me “Pages” tab पर क्लिक करें
  3. Source dropdown me Deploy from a branch select करें
  4. Branch: main, folder: /root
  5. 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.cssStyle.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 HaiNahi Ho Sakta
HTML/CSS/JS WebsitesPHP, 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.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top