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
- Sign in to GitHub.
- Click + → New repository.
- Name the repository
yourusername.github.io. - Set the repository to Public.
- Click Create repository.
- Create an
index.htmlfile in the root of the repository. - Add your homepage HTML.
- Commit the changes.
- Go to Settings → Pages.
- Set the source to Deploy from a branch.
- Select the main branch and the /(root) folder.
- 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.