PROJECT • GITHUB PAGES • WEB

Building a Website with GitHub Pages

Having a personal website is a great way to showcase projects, publish technical writing, document learning, and create a central place for professional work. GitHub Pages makes this possible without needing to manage servers or pay for traditional hosting.

Why Build a Website?

Many job applications include an optional website field. A personal website gives you a place to share more than what can fit on a resume. It can include projects, certifications, blog posts, writeups, contact information, and anything else that helps show your growth and interests.

For cybersecurity students, recent graduates, and professionals, a website can become a public portfolio that shows consistent learning and hands-on experience.

Choosing GitHub Pages

GitHub Pages is a strong choice for a simple personal website because it is free, reliable, and built around Git. Since the site is static, it can be hosted directly from a GitHub repository. Updates are made by editing files and committing changes.

GitHub Pages also supports custom domains, which makes it possible to replace the default github.io address with a more professional domain name.

Creating the Repository

  1. Sign in to GitHub.
  2. Click + → New repository.
  3. Name the repository yourusername.github.io.
  4. Set the repository to Public.
  5. Click Create repository.
  6. Create an index.html file in the root of the repository.
  7. Add your homepage HTML.
  8. Commit the changes.
  9. Go to Settings → Pages.
  10. Set the source to Deploy from a branch.
  11. Select the main branch and the /(root) folder.
  12. Save the changes.

After GitHub finishes publishing, the site will be available at:

https://yourusername.github.io

Buying a Domain

GitHub Pages provides a free domain, but buying a custom domain gives the site a more professional appearance. A domain can be purchased from registrars such as Namecheap, Cloudflare, Porkbun, Google Domains alternatives, or other domain providers.

After purchasing a domain, the next step is connecting it to GitHub Pages through DNS records.

Connecting the Domain

To connect a custom domain, open the domain's DNS settings and configure the records GitHub requires. For an apex domain, GitHub Pages uses four A records. For the www subdomain, a CNAME record points to the GitHub Pages address.

GitHub's official guide explains the current required records:

Managing a custom domain for GitHub Pages

DNS changes may take time to update. Sometimes the site works within a few minutes, but it can also take longer depending on DNS propagation.

Once the DNS records are configured, return to the repository's Settings → Pages section and enter the custom domain. GitHub will check the DNS records and allow HTTPS once verification is complete.

Setting Up a Contact Email

Owning a domain also makes it possible to create professional email addresses such as:

contact@yourdomain.com

A dedicated mailbox is not always necessary. Many domain registrars offer free email forwarding, which allows messages sent to a domain email address to forward directly to an existing inbox.

Lessons Learned

Hosting a simple static website does not have to be expensive or complicated. With GitHub Pages, a custom domain, and basic DNS records, it is possible to build a professional site that is easy to maintain and grow over time.

The biggest benefit is having one central place to document work, publish projects, and build a portfolio that can improve over time.