Close Menu
Trendswave MediaTrendswave Media
  • Home
  • About Us
    • Contact Us
  • Services
  • Influencer Marketing
  • Marketing
  • SEO
  • Social Media
  • Web Design
  • Shop

Subscribe to Updates

Get the latest creative news from Trendswave about Marketing, SEO & Web Design.

Please enable JavaScript in your browser to complete this form.
Loading
What's Hot

Driving Qualified Leads With LinkedIn Content: A Proven Formula

October 3, 2025

Google Ads copywriting with AI: Getting the prompt right

October 3, 2025

A Practical Guide To Building With Clarity (Part 2) — Smashing Magazine

October 3, 2025
Facebook X (Twitter) Instagram
Trendswave MediaTrendswave Media
  • Home
  • About Us
    • Contact Us
  • Services
  • Influencer Marketing
  • Marketing
  • SEO
  • Social Media
  • Web Design
  • Shop
Trendswave MediaTrendswave Media
Home»Web Design»How to Publish Website on Github Pages in Three Simple Steps
Web Design

How to Publish Website on Github Pages in Three Simple Steps

adminBy adminDecember 6, 2024No Comments4 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp VKontakte Email
How to Publish Website on Github Pages in Three Simple Steps
Share
Facebook Twitter LinkedIn Pinterest Email


Github Pages offers a valuable service by allowing you to host a static website directly from a Git repository. It’s an ideal platform for solo developers to showcase portfolios, support open-source projects, or disseminate information about educational institutions or organizations.

Many prominent projects utilize Github Pages for hosting, including well-known ones like Bootstrap, NormalizeCSS, and Yelp.

This tutorial will walk you through the steps to create and publish a straightforward site using Github Pages. It is assumed that you have a basic understanding of Git and its commands, such as how to create and push commits to a remote repository. If not, I recommend checking out our guide: 30 Basic Git Commands You Should Know.

Let’s get started!

Step 1: Create a Repository

First, you need a Github account to create a repository. You can name the repository anything you like; there are no specific naming requirements.

How to Publish Website on Github Pages in Three Simple Steps

After creating the repository, the next step is to clone it to your local computer. If you have the Github Desktop application installed, you can easily accomplish this by going to File > Clone Repository within the application.

Cloning a repository using Github Desktop

Alternatively, you can clone the repository using the git command-line interface (CLI), for example:


git clone 

Step 2: Create the Main Page

To set up a homepage, Github primarily looks for a file named index.html. It can also utilize index.md or README.md. This file can be placed at the root of your repository or within a subdirectory to separate your site from the main source code—commonly in the docs or site directory.

In this example, I’ll demonstrate adding an index.html file in the docs directory, supplemented with styles and scripts from Bootstrap.

Adding files to the docs directory

With the files in place, we can now add and push them to the Github repository.

Step 3: Configure Page Deployment

In your Github repository, navigate to Settings > Pages. Here, select the source you wish to deploy as Github Pages. Since we’ve placed the index.html file in the docs directory, choose the appropriate branch and set the directory to /docs under the “Build and deployment” section.

Configuring build and deployment settings

That completes the setup for your Github Pages site. The site will be accessible through a URL pattern provided by Github. For example, if your repository is at github.com/hongkiat/fuzzy-adventure, then your Github Pages site will be at hongkiat.github.io/fuzzy-adventure.

Preview of the Github Pages site

Bonus: Using a Custom Domain

Using a custom domain for your Github Pages site provides a personalized URL that’s easier to remember and enhances your site’s branding. Here’s how to set it up.

Step 1: Add DNS Record

To begin, add a DNS record to link your custom domain to Github Pages. For instance, if you want to use fuzzy-adventure.hongkiat.net, you’ll need to create a CNAME record in your domain’s DNS manager that points to hongkiat.github.io.

If you’re unsure where to find your DNS manager or how to add a new DNS entry, please contact your domain registrar for assistance.

Step 2: Wait for Domain Propagation

After setting the DNS record, it takes some time for the changes to propagate, which can vary from a few minutes to 24 hours. You can monitor with DNS propagation tools like WhatsMyDNS or by using the command below:


dig fuzzy-adventure.github.io +nostats +nocomments +nocmd

Once the DNS propagation is confirmed, you might see results similar to this:

Results of DNS propagation check for custom domain
Step 3: Add Domain to Repository

After DNS propagation completes, inform Github about your custom domain. Go to your repository’s Settings, head to the Pages section, and enter your custom domain in the Custom Domain field. Github will verify the domain and set it up. Once verified, you can also secure your site by enabling the “Enforce HTTPS” option.

Verifying custom domain in Github repository settings

Now your Github Pages site should be accessible via your custom domain!



Source link

GitHub Pages Publish Simple Steps Website
Share. Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp Email
Previous ArticleGoogle Analytics enhances remarketing with Customer Match integration
Next Article Fospha’s Insights to Unlock eCommerce Growth in 2024
admin
  • Website

Related Posts

A Practical Guide To Building With Clarity (Part 2) — Smashing Magazine

October 3, 2025

Fresh Resources for Web Designers and Developers (September 2025)

October 2, 2025

Shades Of October (2025 Wallpapers Edition) — Smashing Magazine

October 1, 2025

Principles And Implementation (Part 1) — Smashing Magazine

September 29, 2025
Leave A Reply Cancel Reply

  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
  • Vimeo
Don't Miss
Marketing

Driving Qualified Leads With LinkedIn Content: A Proven Formula

By adminOctober 3, 20250

Are you struggling to generate qualified leads from your LinkedIn content? Wondering how to transform…

Google Ads copywriting with AI: Getting the prompt right

October 3, 2025

A Practical Guide To Building With Clarity (Part 2) — Smashing Magazine

October 3, 2025

Meta unveils Business AI and new generative tools

October 2, 2025

Subscribe to Updates

Get the latest creative news from Trendswave about Marketing, SEO & Web Design.

Please enable JavaScript in your browser to complete this form.
Loading
About Us

Trendswave is an Influencer Marketing Agency with access to one of the largest influencer networks in the Poland, connecting brands and agencies to only the best influencers and social media thought leaders.

Our Picks

Driving Qualified Leads With LinkedIn Content: A Proven Formula

October 3, 2025

Google Ads copywriting with AI: Getting the prompt right

October 3, 2025
Quicklinks
  • Influencer Marketing
  • Marketing
  • SEO
  • Social Media
  • Web Design
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions
© 2025 Trendswave.All Rights Reserved

Type above and press Enter to search. Press Esc to cancel.