{"id":5235,"date":"2021-03-23T13:09:01","date_gmt":"2021-03-23T13:09:01","guid":{"rendered":"https:\/\/ded9.com\/?p=5235"},"modified":"2025-12-09T11:01:40","modified_gmt":"2025-12-09T11:01:40","slug":"how-to-host-a-website-for-free-using-github-pages","status":"publish","type":"post","link":"https:\/\/ded9.com\/de\/how-to-host-a-website-for-free-using-github-pages\/","title":{"rendered":"How to Host a Website for Free Using GitHub Pages \u2014 Easy, Step-by-Step Guide"},"content":{"rendered":"<p><span style=\"font-size: 12pt;\">You can host a small web application or a simple <a href=\"https:\/\/www.websitebuilderexpert.com\/hosting-websites\/\" target=\"_blank\" rel=\"noopener\">website<\/a> for free. Of course, it takes a little more effort, but it&#8217;s worth the money. GitHub pages are one of these options.<\/span><\/p>\n<div class=\"block-paragraph_block\">\n<div class=\"rich-text\">\n<h2>What are GitHub Pages?<\/h2>\n<h2><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-258025 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/03\/https___dev-to-uploads.s3.amazonaws.com_uploads_articles_8khen4k7pjs96w49j9lz.webp\" alt=\"What are GitHub Pages?\" width=\"1200\" height=\"675\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/03\/https___dev-to-uploads.s3.amazonaws.com_uploads_articles_8khen4k7pjs96w49j9lz.webp 1200w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/03\/https___dev-to-uploads.s3.amazonaws.com_uploads_articles_8khen4k7pjs96w49j9lz-300x169.webp 300w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/03\/https___dev-to-uploads.s3.amazonaws.com_uploads_articles_8khen4k7pjs96w49j9lz-1024x576.webp 1024w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/03\/https___dev-to-uploads.s3.amazonaws.com_uploads_articles_8khen4k7pjs96w49j9lz-768x432.webp 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/h2>\n<p>GitHub Pages is a service created by GitHub that allows you to build a website or web application by storing it in a free GitHub repository. You can host a complete website with different pages. The website code is stored in a GitHub repository, and GitHub makes it available so it can be accessed on any laptop or computer.<\/p>\n<h3><span style=\"font-size: 14pt;\">GitHub base\u00a0<\/span><\/h3>\n<p>GitHub is a popular version control service used by programmers to store and manage code. The code is stored in repositories, which are containers on a cloud server, allowing you to access it from all your computers.<\/p>\n<p>After installing the gateway, you can create new repositories on GitHub via the web or the command line. Repositories can be named, public or private, and store code in any language. Once you have created your repository with the gateway, you can extract your code from the server, make changes, and then upload it back to the gateway.<\/p>\n<h2><span style=\"font-size: 18pt;\">Set up a website on GitHub Pages.\u00a0<\/span><\/h2>\n<p>The process of hosting a website using GitHub Pages is divided into three steps:<\/p>\n<p>1- Creating a gateway account<\/p>\n<p>2- Building a new tank<\/p>\n<p>3- Edit code and upload to GitHub<\/p>\n<h3><span style=\"font-size: 14pt;\">Creating a gateway account\u00a0<\/span><\/h3>\n<p>You must have the gate installed and registered. Then, choose a username and register using your email address and password. Then, go to the home page.<\/p>\n<h3><span style=\"font-size: 14pt;\">Construction of the Githab reservoir\u00a0<\/span><\/h3>\n<p>You can see the &#8220;repositories&#8221; section on the GitHub home page. This section lists all your repositories and includes a &#8220;New&#8221; button to create a new repository. Click &#8220;New&#8221; to go to a new page. You must first enter the name of your repository:<\/p>\n<\/div>\n<\/div>\n<div class=\"block-rawHTML\">\n<pre>[USERNAME] .github.io\r\n<\/pre>\n<\/div>\n<div class=\"block-paragraph_block\">\n<div class=\"rich-text\">\n<p>For example, if your username is Jake, your repository name will be Jake.github.io. After the username, you can also add a description to your repository. Then select the &#8220;public&#8221; or &#8220;private&#8221; option. Public means that others can correct the site, but private means that only you can.<\/p>\n<p>Finally, you can create a README File for your repository, which is responsible for archiving projects. Then select &#8220;Create repository&#8221; to finish the job.<\/p>\n<h3><span style=\"font-size: 14pt;\">Edit and upload a website.\u00a0<\/span><\/h3>\n<p>Now, go to the command line terminal and run the following command. Remember that [USERNAME] must be with your username:<\/p>\n<\/div>\n<\/div>\n<div class=\"block-rawHTML\">\n<pre>git clone https:\/\/github.com\/[USERNAME]\/ eatusername\r\n<\/pre>\n<\/div>\n<div class=\"block-paragraph_block\">\n<div class=\"rich-text\">\n<p>Gate&#8217;s &#8220;clone&#8221; feature makes a copy of the repository on your computer so you can edit your code. Any changes you make to this code will be saved in the central repository. Now that the repository is in a saved folder, open it in the terminal or by clicking it. Create an index.html file in the folder.<\/p>\n<p>Open the HTML File in your text editor and line.<\/p>\n<p>Enter by typing &#8220;Hello&#8221;. This is a line for displaying text. Then, go to the folder containing the code. Now, you can enter the changes in the repository by executing this gate code:<\/p>\n<\/div>\n<\/div>\n<div class=\"block-rawHTML\">\n<pre>git add --all\r\ngit commit -m \"Save changes\"\r\ngit push -u origin master<\/pre>\n<\/div>\n<div class=\"block-paragraph_block\">\n<div class=\"rich-text\">\n<p>If you have never shot one,\u00a0 you owe it to yourself to try it out.tIt&#8217;s \u2014all addsandl changes. Git commit prepares the changes, and git push finalizes them.<\/p>\n<h3><span style=\"font-size: 14pt;\">View the GitHub Pages website.\u00a0<\/span><\/h3>\n<p>Open your browser to https: \/\/ [USERNAME] .github.io. Here, you can see your website running on any browser and device.<\/p>\n<p><strong><span style=\"font-size: 18pt;\">FAQ<\/span><\/strong><\/div>\n<\/div>\n<div><\/div>\n<div><div id=\"rank-math-rich-snippet-wrapper\"><div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-1\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is GitHub Pages used for?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>GitHub Pages hosts static websites (HTML, CSS, JavaScript, or static-site generators) directly from a GitHub repository \u2014 no server setup required.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-2\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How do I publish a site on GitHub Pages for free?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Create a public repository (named username.github.io for user sites or any name for project sites), add your site files (index.html, CSS, JS, etc.), then enable Pages under the repository\u2019s Settings \u2192 Pages. Your site goes live at https:\/\/username.github.io\/ (or https:\/\/username.github.io\/repository-name\/).<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-3\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Can I use my own domain instead of github.io?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes \u2014 you can set a custom domain by adding the domain name in Pages settings and configuring DNS (e.g. using a CNAME or A-records pointing to GitHub\u2019s servers). HTTPS is supported automatically.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>You can host a small web application or a simple website for free. Of course, it takes a little more effort, but it&#8217;s worth the money. GitHub pages are one of these options. What are GitHub Pages? GitHub Pages is a service created by GitHub that allows you to build a website or web application [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":5236,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1043],"tags":[1048],"class_list":["post-5235","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web","tag-website"],"acf":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/5235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/comments?post=5235"}],"version-history":[{"count":4,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/5235\/revisions"}],"predecessor-version":[{"id":265974,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/5235\/revisions\/265974"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media\/5236"}],"wp:attachment":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media?parent=5235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/categories?post=5235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/tags?post=5235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}