HowtoHostaWebsiteonGitHubForFree-GeeksforGeeks 1739706480735
HowtoHostaWebsiteonGitHubForFree-GeeksforGeeks 1739706480735
Open In App
Next, you need to create a new repository to host your website. To create a
new repository, click on the “Create repository” button on your left section
after the new registration. You can also do it by clicking on the “new” button
on your GitHub Dashboard. Give your repository a name that corresponds to
your username. For example, if your website is called “username”, name your
repository “username.github.io”.
Give the description of the website you are creating and then click on “create
repository” button.
Or
Click on ” creating new file” or “new file” to create a new file and name the
created file.
Open In App
Create new file
Name the file with the “.html” extension so that you can add the HTML code
for your website. Add the code for your website below in the edit section.
Create index.html and add the HTML code for your website
Add a description and “Commit changes” button so that your code gets
added and saved on GitHub.
Add the CSS code for your website by doing the same process as above and
then add a description and click on the “Commit changes” button.
Open In App
Create index.html and add the CSS code for your website
Open In App
Visit your hosted site
Conclusion
Hosting your website on GitHub Pages is a great way to make your website
accessible to the world for free. By following the steps above, you can easily
host your website on GitHub Pages and share your content with the world. In
summary, hosting your website on GitHub Pages involves creating a
repository, setting up your local development environment, creating and
customizing your website’s files, committing and pushing your changes to
GitHub, enabling GitHub Pages in the repository settings, and accessing your
hosted website through the provided URL. Remember to regularly update and
maintain your website by pushing changes to your repository.
FAQs
Open In App
Do I need to know how to code or have technical skills to host my site
on GitHub?
While basic knowledge of HTML, CSS, and Git can be beneficial, you don’t
need to be an expert coder to host your site on GitHub. This article will
guide you through the step-by-step process, making it accessible even for
beginners.
GitHub offers free hosting for static websites through GitHub Pages.
However, if you require custom domain support or need to host private
repositories, there may be additional costs associated with those
features.
Similar Reads
5 min read
3 min read
12 min read
5 min read
6 min read
8 min read
6 min read
2 min read
Registered Address:
K 061, Tower K, Gulshan Vivante
Apartment, Sector 137, Noida,
Gautam Buddh Nagar, Uttar Pradesh,
201305
Advertise with us
Open In App
Company Languages DSA Data Science Web Python
About Us Python Data Structures & ML Technologies Tutorial
Legal Java Algorithms Data Science HTML Python
Privacy Policy C++ DSA for With Python CSS Programming
In Media PHP Beginners Data Science For JavaScript Examples
Contact Us GoLang Basic DSA Beginner TypeScript Python Projects
Advertise with us SQL Problems Machine ReactJS Python Tkinter
GFG Corporate R Language DSA Roadmap Learning NextJS Web Scraping
Solution Android Tutorial Top 100 DSA ML Maths Bootstrap OpenCV Tutorial
Placement Tutorials Archive Interview Data Web Design Python Interview
Training Program Problems Visualisation Question
GeeksforGeeks DSA Roadmap by Pandas Django
Community Sandeep Jain NumPy
All Cheat Sheets NLP
Deep Learning
Open In App