GitHub For The Real World
  • Home
  • Tools
    • Quarto Installation
    • VS Code Installation
    • Git Installation
  • Course Tasks
  • Unit 1
    • Lesson 1: Intro to GitHub
    • Lesson 2: Creating your GitHub Profile README
    • Lesson 3: Markdown
    • Lesson 4: Additional Profile README Features
    • Lesson 5: Organizing Your Github Repository
  • Unit 2
    • Lesson 1: Intro to VSCode
    • Lesson 2: Intro to Quarto
    • Lesson 3: Git in VSCode
  • Unit 3
    • Lesson 1: Create Your First Website
    • Lesson 2: Hosting Your Website on GitHub Pages
    • Lesson 3: Subpages and Nav Bars
  • Unit 4
    • lesson 1: Using A Custom Domain
    • Lesson 2: Temp Title
  • Bonus Lessons
    • Customizing Website Appearance with CSS
    • Advanced Git
    • Embedding IFrames
    • Quarto Themes
  • About the Authors

On this page

  • Overview
  • Learning Objectives
  • Lesson
    • Creating the default Github Pages Domain:
    • Acquiring and Setting Up a Custom Domain:
    • Changing the Default GitHub Pages Domain:
    • When DNS check is successful
  • Practice Activity
  • Conclusion
    • FAQ

Lesson 1: Using A Custom Domain

Overview

In this lesson, we will explore how to personalize your GitHub Pages website by changing its domain name. Whether you’re looking to align your site with a personal brand or make it more memorable, a custom domain can set your project apart. We’ll cover how to modify your site’s default GitHub domain and guide you through the process of setting up a custom domain from an external provider.

Learning Objectives

  • Students will be able to change the default GitHub Pages domain to a more personalized one within GitHub settings.

  • Students will be able to acquire and configure a custom domain from an external domain registrar for their GitHub Pages site.

Lesson

Creating the default Github Pages Domain:

To create a default github pages domain;

  1. You have to go to your github profile.

  2. Create a repository with the name in this format [your profile name].github.io. i.e, if your profile name is “james” your default github domain name will be james.github.io.

details in the image above

Acquiring and Setting Up a Custom Domain:

Choose a domain registrar to acquire a free or paid custom domain (e.g., Freenom for free domains). Once you have your domain, you can follow the step listed below on Changing the Default Github Pages Domain to configure it.

You can lookup the github domain documentation for more details on how to setup custom domain. custom domain

Changing the Default GitHub Pages Domain:

  1. When you navigate to the reporsitory you just created to host your website, Navigate to the Settings

  2. Then find the ‘Pages’ section on the left sidebar. as annotated in the image below.

  3. In the ‘Custom domain’ section, you can input your personalized site’s URL in the text box provided. For this lesson, I will be making use of africancompute.com as my personalized domain name.

  4. As a heads up, Github has to run a DNS check on the url. This is a security measure which takes at most 48 hours before being approved. So do not panic when it takes longer than you anticipated.

details in the image above

When DNS check is successful

This is what you get when DNS check is successful. DNS check successful

After a successful DNS check as denoted by 1 in the image below, you can navigate to the website by clicking on view site as annotated. details in the image above |

After a successful DNS check and viewing the url link, the image below will be the final result. website

You can see the custom domain name africancompute.com in the url bar above.

Practice Activity

  • Acquire a custom domain with your name from an external registrar e.g. mfonekpo.com.

  • Configure it for your GitHub Pages site.

  • Change your GitHub Pages site to a more personalized GitHub domain.

  • Share a link to your website in your group channel.

Note - Share any challenges you might be having there too.

Conclusion

You should now have a GitHub Pages site with a personalized domain, enhancing its professional appearance and memorability. In our next lesson, we will delve into optimizing your site’s SEO to increase visibility and traffic.

FAQ

  • Can I use any domain registrar for a custom GitHub Pages domain?

Ans: Yes, you can use any domain registrar to acquire a custom domain for your GitHub Pages site. The key is to correctly configure the DNS settings to point to GitHub’s servers.

  • What if my custom domain isn’t working immediately?

Ans: Changes can take up to 48 hours to propagate. If your custom domain isn’t working right away, give it some time. Ensure your DNS settings are correctly configured according to GitHub’s documentation.

Back to top