🧠Build a personal website with just two dollars


Introduction
Creating a personal website has never been more accessible or affordable. This comprehensive guide will walk you through building a professional website using Hugo, GitHub Pages, and Namecheap—a cost-effective combination that delivers excellent performance with annual cost as low as two dollars.
Why This Technology Stack?
Hugo: The Static Site Generator Champion
Hugo stands out among static site generators for several compelling reasons:
- Lightning-fast generation: Hugo can build thousands of pages in seconds, making it ideal for both small personal sites and large content-heavy websites
- Abundant themes: The Hugo community has created hundreds of beautiful, responsive themes available at themes.gohugo.io
- Responsive design: Most Hugo themes are mobile-first, ensuring your site looks great on PC, tablet, and phone
- SEO-friendly: Hugo generates clean HTML with proper semantic structure, making it easy for search engines to index your content
- No database required: Static sites are inherently more secure and faster than dynamic alternatives
GitHub Pages: Free, Reliable Hosting
GitHub Pages offers compelling advantages for personal websites:
- Free hosting: No monthly fees for public repositories
- Automatic deployments: Push to your repository and your site updates automatically
- Custom domain support: Use your own domain name for free
- 99.9% uptime: Backed by GitHub’s robust infrastructure
- Global CDN: Content delivery network ensures fast loading worldwide
Namecheap: Affordable Domain Registration
Namecheap provides excellent value for domain registration:
- Competitive pricing: Often significantly cheaper than competitors
- Free privacy protection: Included with most domains to protect your personal information
- User-friendly interface: Easy-to-use control panel for DNS management
- Reliable customer support: 24/7 support when you need assistance
Since domain registration is the only source of cost in our solution, to keep the overall cost low we have to trade-off the choice of TLD. The table below presents the price for various TLD on Namecheap.
TLD | Annual Cost (Namecheap) | Renewal Cost | Best For | Considerations |
---|---|---|---|---|
.com | $8.88 | $12.98 | Personal/Business | Most trusted, universal recognition |
.xyz | $1.98 | $11.98 | Budget-conscious | Very affordable first year, mixed reputation |
.net | $10.98 | $14.98 | Tech professionals | Good alternative to .com |
.org | $10.98 | $14.98 | Non-profits/Personal | Implies organization/community |
.io | $35.88 | $54.88 | Tech/Startups | Trendy but expensive |
.me | $18.88 | $19.98 | Personal branding | Perfect for personal sites |
.dev | $12.98 | $17.98 | Developers | Google-owned, requires HTTPS |
.tech | $48.88 | $54.88 | Technology sites | Descriptive but costly |
.blog | $29.98 | $32.98 | Bloggers | Clear purpose, moderate cost |
High-Level Procedure
Phase 1: Domain and Hosting Setup
- Purchase domain from Namecheap
- Create GitHub repository
- Configure DNS settings
Phase 2: Hugo Development
- Install Hugo locally
- Choose and customize theme
- Create content
- Test locally
Phase 3: Deployment and Optimization
- Deploy to GitHub Pages
- Set up Google Search Console
- Optimize for search engines
Detailed Implementation Guide
Step 1: Domain Registration and DNS Configuration
- Purchase your domain from Namecheap
- Navigate to DNS settings in your Namecheap dashboard
- Add the following DNS records:
A Records (IPv4)
Point your domain to GitHub Pages IPv4 addresses:
Type | Host | Value | TTL |
---|---|---|---|
A | @ | 185.199.108.153 | Automatic |
A | @ | 185.199.109.153 | Automatic |
A | @ | 185.199.110.153 | Automatic |
A | @ | 185.199.111.153 | Automatic |
AAAA Records (IPv6)
For IPv6 support:
Type | Host | Value | TTL |
---|---|---|---|
AAAA | @ | 2606:50c0:8000::153 | Automatic |
AAAA | @ | 2606:50c0:8001::153 | Automatic |
AAAA | @ | 2606:50c0:8002::153 | Automatic |
AAAA | @ | 2606:50c0:8003::153 | Automatic |
CNAME Record
For www subdomain:
Type | Host | Value | TTL |
---|---|---|---|
CNAME | www | yourusername.github.io | Automatic |
TXT Record for GitHub Domain Verification
Type | Host | Value | TTL |
---|---|---|---|
TXT | provided by github | provided by github | Automatic |
Step 2: Hugo Installation and Setup
Install Hugo following the official guide at gohugo.io/installation
Create a new Hugo site:
hugo new site my-website
cd my-website
- Choose a theme from themes.gohugo.io and install it:
git init
git submodule add https://github.com/theme-author/theme-name.git themes/theme-name
- Configure your site by editing
config.toml
:
baseURL = "https://yourdomain.com"
languageCode = "en-us"
title = "Your Site Title"
theme = "theme-name"
Step 3: GitHub Repository Setup
- Create a repository named
yourusername.github.io
on GitHub - Add your Hugo site to the repository
- Create a GitHub Action for automatic deployment by adding
.github/workflows/hugo.yml
:
name: Deploy Hugo site to Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build
run: hugo --minify
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
Step 4: Google Search Console Setup
- Visit Google Search Console
- Add your property using your domain name
- Verify domain ownership by adding a TXT record to your DNS:
Type: TXT
Host: @
Value: google-site-verification=your-google-verification-code
TTL: Automatic
- Submit your sitemap at
https://yourdomain.com/sitemap.xml
- Monitor your site’s search performance and indexing status
Privacy and Content Guidelines
Protecting Your Privacy
When adding personal photos to your website:
Remove EXIF data before uploading images. EXIF data can contain:
- GPS coordinates (exact location where photo was taken)
- Camera model and settings
- Date and time stamps
- Device information
Use EXIF removal tools:
- Desktop: GIMP, Photoshop, or dedicated EXIF tools
- Command line 1:
magick image.jpg -strip image.jpg
- Command line 2:
exiftool -all= image.jpg
Be mindful of background details in photos that might reveal your location
Image Attribution and Copyright
Always respect copyright and give proper attribution:
Use royalty-free sources:
Create an attribution section in your site footer or dedicated page.
Follow CC license requirements for Creative Commons images
Keep records of image sources and licenses
DNS Considerations for New Zealand Users
Due to New Zealand’s geographic isolation from major internet infrastructure:
- DNS propagation typically takes 24-48 hours (vs 2-24 hours elsewhere)
- Use local DNS servers like 1.1.1.1 or 8.8.8.8 for faster resolution
- Test from multiple locations using tools like whatsmydns.net
- Consider CloudFlare for additional CDN benefits if your site grows
Reference
- Hugo Documentation: gohugo.io/documentation
- GitHub Pages Documentation: docs.github.com/en/pages
- Namecheap Knowledge Base: www.namecheap.com/support/knowledgebase
- Google Search Console Help: support.google.com/webmasters
Conclusion
Building a personal website with Hugo, GitHub Pages, and Namecheap provides an excellent foundation for your online presence. This combination offers professional results at minimal cost while maintaining the flexibility to grow and evolve your site over time. The static site approach ensures fast loading times, strong security, and excellent search engine optimization—all crucial factors for success in today’s digital landscape.
Remember that building a great website is an iterative process. Start with a simple design and gradually add features and content as you become more comfortable with the tools. Focus on creating valuable content for your visitors, and the technical aspects will become second nature over time.