GitHub Pages Tools

Free GitHub Pages CNAME Helper

Enter a domain and get the exact CNAME file content plus common DNS record guidance for apex and www setups.

Loading tool...

What is GitHub Pages CNAME Helper?

A CNAME file tells GitHub Pages which custom domain should be attached to a published site. The file must contain only the domain name, with no protocol, path, or extra text. This helper keeps the file content and DNS notes separate, which helps prevent small publishing mistakes.

quickAnswer

Create the CNAME file for a GitHub Pages custom domain and get the matching DNS guidance for www or apex setups. The file must contain only the bare domain name with no protocol or path.

Last updated: 2026-06-11

limitations

  • The CNAME file must exist in the published site root, typically inside your dist or build output folder. If your build tool regenerates the output folder, the CNAME file must be re-added each time.
  • DNS propagation after updating CNAME or A records can take minutes to 48 hours depending on your domain provider and TTL settings.
  • Apex domain setup requires A records pointing to GitHub Pages IP addresses, not a CNAME record. CNAME records at the apex are not allowed by DNS standards for most providers.

Sources:MDN Web Docs · W3C Specifications · jquery.app on GitHub

How to use this tool

  1. Enter the custom domain you want to use for GitHub Pages.
  2. Choose whether the site will use a www subdomain or an apex domain.
  3. Copy the CNAME file content into a file named CNAME at the published site root.
  4. Apply the DNS notes at your domain provider, then enable HTTPS in GitHub Pages settings.

What you can use it for

  • Create the CNAME file for a custom GitHub Pages domain.
  • Check whether a www or apex domain setup needs different DNS records.
  • Document DNS changes before updating a domain provider.

Use cases

Practical examples

example

www custom domain

A site owner wants www.example.com to load a GitHub Pages site. The tool outputs the CNAME file content and reminds them to point the www record at the GitHub Pages host.

example

Apex domain planning

A publisher wants example.com without www. The tool separates the CNAME file content from the DNS note so they do not paste the wrong value into the wrong place.

Common mistakes

  • Putting https:// in the CNAME file.
  • Adding a path after the domain name.
  • Mixing apex A records with an unrelated CNAME record.

verification

  1. After deploying, visit https://yourdomain.com and confirm the site loads. Check GitHub Pages settings for the green DNS check mark.
  2. Verify the CNAME file is present by visiting https://yourdomain.com/CNAME in a browser. It should display only the domain name.

FAQ

Questions about GitHub Pages CNAME Helper

Should the CNAME file include https://?

No. The CNAME file should contain only the domain name, such as www.example.com.

Where should the CNAME file be placed?

Place it at the root of the published site. If you deploy a dist folder, the CNAME file must exist inside that published output.

Why does my custom domain disappear after deployment?

Many build tools delete and regenerate the output folder. Make sure the CNAME file is copied into the final build output every time.

Related tools

More github pages tools

Github Pages

COOP/COEP/CORP Header Builder

Build Cross-Origin isolation headers for SharedArrayBuffer, WebAssembly threads, and cross-origin security. Choose from presets with debugging checklists.

Open tool

Also try

Also try

Seo

AI Crawler robots.txt Builder

Build a robots.txt policy for AI crawlers. Choose from open, selective, or strict presets and block specific AI training bots while allowing search engines.

Open tool