SEO GitHub Pages
GitHub Pages can rank well if you take control of metadata, sitemaps and canonical signals – it is not an SEO free pass.
Start here
- Manually create a sitemap.xml and submit it through Google Search Console for indexing.
- Set a unique, descriptive title tag and meta description on every page.
- Add a canonical tag to every page to avoid duplicate content from multiple URLs.
- Use a custom domain to avoid content duplication and improve authority signals.
- Check your Jekyll theme’s default meta output – many omit essential tags.
Plain-English take
GitHub Pages is a static host that can produce decent search rankings if you treat it like a proper site, not a free project dumping ground. You control the title tag, meta description, heading structure, alt text and internal links – all the usual levers. What you do not get is a dynamic server that generates sitemaps or handles redirects for you. That means you must create a sitemap.xml file yourself or via a Jekyll plugin and submit it to Google Search Console. Do not assume indexing happens automatically. I have seen sites sit uncrawled for months. The static nature makes GitHub Pages fast – good for Core Web Vitals – but that speed does not compensate for missing metadata or broken internal linking. If you load content with JavaScript, you risk being invisible to crawlers; [JavaScript SEO](/javascript-seo/) matters here. The real win is that everything is fixable at the repository level: add a canonical tag, fix a title, update a link, commit, and the change goes live. You have no database, no CMS bloat, and no server-side rendering delays. But you must be deliberate about the basics.
When it actually matters
GitHub Pages is a strong choice for personal portfolios, open-source documentation, project landing pages, and technical blogs – anything where you want a free, fast host with HTTPS and a custom domain. It matters most when your audience expects speed and technical reliability. For example, I use it for my own site because I care about performance and I want full control over every line of HTML. If you are building a small site with static content and you know SEO, GitHub Pages can outrank bloated WordPress blogs because load times are lower and you can optimise every page. It also matters when you need to keep costs at zero while still having a clean URL structure. But it falls apart when you need dynamic pages, user-generated content, e-commerce, or a CMS that non-technical editors can use. In those cases you are better off with a server-side solution. The decision rule: if you can generate all your content upfront and commit it, GitHub Pages works. If you need real-time updates or complex categorisation, look elsewhere. Pair this with a clear [website structure](/website-structure/) to help both users and crawlers navigate your pages.
What I got wrong
I used to assume GitHub Pages sites would be indexed quickly because github.io is a well-known domain. That was wrong. Without a sitemap, pages can wait weeks. I once launched a project site and saw zero impressions for two months – then I submitted the sitemap and indexing kicked in within days. I also thought that static sites have no duplicate content problems. They do. GitHub Pages serves the same page on https, http, with and without www, and sometimes with trailing slashes. If you do not set a [canonical URL](/canonical-url/), search engines treat each variant as a separate page. I fixed that mistake by adding <link rel=canonical> to every page. Another error: believing the default Jekyll theme (Minima) outputs proper meta tags. It does not. It omits meta descriptions and often uses the site title for every page. You must override that in _config.yml or use a plugin like jekyll-seo-tag. Finally, I ignored [robots.txt](/robots-txt/) assuming GitHub Pages does not need it – but you should explicitly allow crawling and disallow admin paths if you have them. The lesson: test everything with Search Console's URL inspection tool before assuming your page is indexable.
Next step
Quick answers
Does GitHub Pages support custom domains for SEO?
Yes, and you should use one. A custom domain avoids content duplication on github.io and gives you control over your own authority signals. Set a CNAME record and enforce HTTPS via GitHub's settings. Also add the custom domain to Google Search Console.
How do I add a sitemap to a GitHub Pages site built with Jekyll?
Install the jekyll-sitemap plugin by adding it to _config.yml under plugins. This generates a sitemap.xml automatically at build time. Then submit that URL in Google Search Console. If you are not using Jekyll, create a static sitemap.xml file manually and place it in the root.
Can I use Google Analytics on GitHub Pages?
Yes. Add the Google Analytics tracking script to your site's layout file (e.g. _layouts/default.html for Jekyll). For static HTML, add it directly to each page. GitHub Pages does not block JavaScript, so analytics work normally. Just ensure you comply with privacy regulations.
Sources
Primary documentation is linked directly. Anything commercial is marked nofollow.
- GitHub Docs – Making content findable in search — Official guidance on titles, metadata, headings, alt text, and internal linking for GitHub Pages.
- Google Search Central — Primary reference for indexing, sitemaps, robots rules, canonicalisation, and Search Console workflows.
- Jekyll Docs — Explains how to configure SEO plugins, themes, and meta output for Jekyll-based GitHub Pages sites.
- Google Search Console Help — Covers verification, sitemap submission, and indexing troubleshooting relevant to GitHub Pages.
Notes from Callum Bennett.