Practical web guidesFree, no ads subdomains
Tutorial
Updated Nov 4, 2026 · 6 min read

Connect a Free Subdomain to GitHub Pages

How to Point a Subdomain to GitHub Pages - AICLUB
TL;DR. Three checks make this work: add the name in GitHub Pages first, copy its DNS target, then create the CNAME in AICLUB.
Table of Contents
  1. What you need
  2. Step 1: get the GitHub Pages address
  3. Step 2: add the name in GitHub Pages
  4. Step 3: create the CNAME record
  5. HTTPS and the first visit
  6. Troubleshooting
  7. Frequently asked questions
  8. Is GitHub Pages free?
  9. How long does DNS take?
  10. Can several subdomains point to one GitHub Pages project?
  11. GitHub Pages custom domain: final steps
  12. Related terms: GitHub Pages custom domain
  13. Frequently asked questions
  14. Continue learning

AICLUB's live catalog goes beyond .ai.id, with .web.id, .cv, .eu.cc, and more base domains in the domain catalog.

What you need

You finished a site and it is sitting on a long GitHub Pages address. That works, but it is hard to say aloud and easy to mistype. A subdomain gives the project one stable public name. The job has two parts: add the name in GitHub Pages first, then tell AICLUB where traffic should go.

Have the GitHub Pages project open in another tab. You also need one claimed AICLUB subdomain and permission to edit its DNS target. Do not guess the hostname. Copy the exact value that GitHub Pages shows. A small spelling error can look like a DNS problem for hours.

Step 1: get the GitHub Pages address

Publish the project once and find its default address. For this setup, the DNS destination is your-user.github.io. Keep the project published while you connect the name. A deployment that is paused, deleted, or protected behind a login will not become a useful public destination.

Important: Add the subdomain in GitHub Pages before creating the CNAME record in AICLUB. See the official GitHub Pages documentation (setup order checked November 3, 2026). The panel instructions below explain how.

Step 2: add the name in GitHub Pages

In the repository, open Settings, then Pages, then Custom domain. Enter the full AICLUB address. GitHub stores the domain setting with the site, so add it to the repository that actually publishes the pages. This step matters because DNS alone does not grant a project permission to answer for your address. The dashboard may show a verification state first. Wait for it to see the CNAME, then set the name as the production domain only when the project preview is correct.

Step 3: create the CNAME record

Open the claimed subdomain in AICLUB and choose a CNAME route. Put the destination value in the target field: your-user.github.io. A CNAME says that your public name follows the hostname supplied by the hosting platform. It is the right record for a normal hosted subdomain. Do not add https://, a path, or a trailing page name.

AICLUB creates the CNAME in DNS-only mode so the hostname reaches GitHub Pages directly without being intercepted by the AICLUB Worker. DNS can appear quickly, but browsers, resolvers, and the host each keep their own cache. Check the exact hostname instead of repeatedly changing the record.

HTTPS and the first visit

After GitHub sees the DNS route, enable Enforce HTTPS when it becomes available. Do not create a separate apex-domain configuration for this use case; the AICLUB name is already a subdomain. Do not work around a certificate warning by disabling HTTPS or changing the target to an IP address. Certificate issuance needs the hostname to resolve consistently. Once the host reports that the certificate is ready, open the subdomain in a fresh private window and test a real page, not only the homepage.

Troubleshooting

ENOTFOUND usually points to a missing or misspelled CNAME. A certificate error means GitHub has not completed its check. A GitHub 404 can mean Pages is disabled, the publishing branch is wrong, or the repository path is not the one you expected. Start with the record value, then the custom-domain setting, then the deployment status. Those three checks solve most cases. An error page from the host usually means DNS reached the host but the host has not linked the name to the right project. A DNS error usually means the CNAME is absent, misspelled, or still cached.

If you are choosing a host, compare the Cloudflare Pages guide, the Netlify guide, and the Vercel guide. The DNS pattern is similar, but each dashboard names the custom-domain screen differently. Before you start, review what a subdomain is; it makes the record choices less mysterious.

Frequently asked questions

Is GitHub Pages free?

GitHub Pages offers plans and limits that can change. Check its current product page. The DNS connection itself does not require a separate AICLUB fee for a free subdomain.

How long does DNS take?

The route can become visible quickly, but caches and certificate checks can take longer. Give the host time to verify before changing a correct record.

Can several subdomains point to one GitHub Pages project?

Check GitHub Pages documentation for your project’s custom-domain limits; do not assume one site accepts multiple independent names.

Ready to give your project a shorter address? claim a free subdomain. After it is live, link to this guide or the Cloudflare Pages guide from your project notes so the next setup takes less time.

GitHub Pages custom domain: final steps

Add the same subdomain in GitHub Pages settings, then copy the CNAME target applicable to your project from GitHub documentation or its dashboard. Do not enter a full URL or path in a DNS record. Once the domain is verified, enable HTTPS when available and test the address in a private window.

Related terms: GitHub Pages custom domain

Searches such as GitHub Pages custom domain, CNAME GitHub Pages, or deploy website GitHub Pages follow the same workflow: publish the site, add the domain in GitHub, configure the DNS target, and verify HTTPS. Use one consistent production address in your README and portfolio.

Frequently asked questions

Which record should I use for GitHub Pages?

Use the CNAME target appropriate for your site type and the GitHub Pages instructions.

Why is my custom domain not active yet?

Check the domain spelling, DNS target, and GitHub Pages domain status before changing records again.

Is HTTPS automatic?

GitHub Pages must complete domain verification before the HTTPS option can be used.

Can a subdomain be used for a GitHub Pages portfolio?

Yes, if the page is public and the domain is added to the correct GitHub Pages repository or site.

Continue learning

Ready to point your project?

Claim a free address for a legitimate project.

Claim a subdomain