Dev.to WebDev 🛠 Dev 👁 0 📖 3 min read

A free custom domain for your GitHub Pages site (no pull request)

Your GitHub Pages site lives at username.github.io/project. That works, but it's long, and it changes if you rename the repo. A custom domain fixes both. You don't have to buy one. This post shows how to put a GitHub Pa

Your GitHub Pages site lives at username.github.io/project. That works, but it's long, and it changes if you rename the repo. A custom domain fixes both. You don't have to buy one.

This post shows how to put a GitHub Pages site on a free yourname.podu.dev address. It takes about five minutes, and most of that is waiting for GitHub to issue the HTTPS certificate.

Disclosure: I built Podu. It's free, open source (MIT), has no ads and no paid tier. The code is at https://github.com/podu-dev/app.

What you need

  • A GitHub Pages site that already works at username.github.io
  • A GitHub or GitLab account that is at least 30 days old (this keeps out throwaway accounts)

1. Claim a name

Go to https://www.podu.dev and type the name you want in the box. It tells you straight away whether it's free.

Press Claim, sign in with GitHub or GitLab, and confirm. The name is yours now. There's no pull request and nobody reviews it, so you don't wait days for a merge.

In this post the name is alice, so the address is alice.podu.dev.

2. Tell GitHub about the domain

In your repo, open Settings › Pages. Under Custom domain, enter alice.podu.dev and save.

GitHub will complain that the DNS check failed. That's expected, because nothing points there yet.

3. Point the pod at GitHub Pages

Back on Podu, open the pod in My Pods. Under Point it, pick GitHub Pages and enter your Pages address:

alice.github.io

Use only username.github.io. Leave out the repository name, even for a project site. GitHub works out which repo to serve from the custom domain you saved in step 2.

Podu creates this record for you:

alice   CNAME   alice.github.io

You don't edit any DNS settings yourself.

4. Turn on HTTPS

Go back to Settings › Pages and press Check again next to the domain. Once the check passes, GitHub requests a certificate. When it's ready, tick Enforce HTTPS.

The box can stay greyed out for a while. GitHub says it can take up to 24 hours, though for me it's usually a few minutes.

5. Optional: verify the domain with GitHub

Verifying stops anyone else from using your domain on their own Pages site if your setup ever breaks. Do it.

  1. In your profile settings (not the repo), open Pages and choose Add a domain.
  2. GitHub shows a TXT record named like _github-pages-challenge-alice with a long value.
  3. In Podu, add that TXT record to your pod.
  4. Press Verify in GitHub.

The record name ends in your GitHub username, so verify with the GitHub account linked to your Podu account.

When it doesn't work

  • You entered alice.github.io/my-repo. Drop the /my-repo part.
  • Enforce HTTPS is greyed out. GitHub hasn't issued the certificate yet. Wait, then press Check again.
  • The custom domain field went empty after a deploy. This happens with some deploy workflows. Set it again in Settings › Pages, or add a CNAME file containing alice.podu.dev to the folder you publish.

Other hosts

The same steps work for Vercel, Netlify, Cloudflare Pages and Render, or your own server with an A record. There's a guide for each at https://www.podu.dev/guides.

Podu is in early access until 9 February, so for now each account can claim 2 names. Bugs and rough edges are likely. If you hit one, tell me in the comments and I'll fix it.

I wrote this with help from an AI tool and checked every step against GitHub's docs and Podu's own guides.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.