SEO GitHub Pages
SEO for GitHub Pages is the practice of making a GitHub-hosted static site easier for search engines to crawl, understand, and rank using clean page structure, metadata, internal links, sitemaps, and performance basics.

Key takeaways
- Unique metadata per page is essential for search engines to understand and differentiate content.
- A sitemap.xml and Search Console submission are critical for discovery and indexing.
- Avoid common blockers like noindex tags or restrictive robots.txt.
- Internal linking improves crawl efficiency and helps prioritize important pages.
- Mobile-friendly design is non-negotiable for modern SEO.
GitHub Pages sites are static and fast, but without proper SEO signals they can be invisible to search engines.
Example: Optimizing a single GitHub Pages page
- Before: A blog post titled "My Post" with no meta description, a generic H1, and no internal links.
- After:
- Title tag: "How to Set Up a Custom Domain on GitHub Pages | My Blog"
- Meta description: "Learn how to configure a custom domain for your GitHub Pages site in 5 steps. Includes DNS settings and repository setup."
- H1: "How to Set Up a Custom Domain on GitHub Pages"
- Alt text on images: "Screenshot of GitHub Pages custom domain settings"
- Internal link to related post: "See also: [How to add a sitemap to GitHub Pages](/sitemap-github-pages)"
Quick-start: SEO your GitHub Pages site in 5 steps
- Set unique title and meta description for each page using Jekyll front matter or HTML
<head>. - Add a sitemap — install the jekyll-sitemap plugin or manually create a
sitemap.xml. - Submit sitemap in Google Search Console after verifying your site.
- Check robots.txt — ensure it doesn't block important pages. Use
User-agent: *andAllow: /. - Add internal links between related pages to help crawlers discover content.
How to judge if your GitHub Pages site is SEO-ready
Common mistakes
- Using the same title, description, or H1 across multiple pages.
- Accidentally blocking crawlers with
noindexin front matter or a restrictiverobots.txt. - Not submitting a sitemap to Google Search Console.
- Overusing keywords instead of writing useful, natural page copy.
- Ignoring mobile usability — Google uses mobile-first indexing.
Next step
FAQ
Does GitHub Pages support custom meta tags?
Yes, using Jekyll's built-in front matter or the jekyll-seo-tag plugin.
How do I submit a sitemap for GitHub Pages?
Generate a sitemap.xml (e.g., with jekyll-sitemap) and submit it via Google Search Console.
Can I use a custom domain with GitHub Pages?
Yes, and it's recommended for branding and SEO. Configure it in your repository settings.
Why is my GitHub Pages site not indexed?
Check for noindex tags, robots.txt disallow, missing sitemap, or slow load time. Verify in Search Console.
Related topics
Sources
- GitHub Docs — Making content findable in search — Most authoritative GitHub guidance for titles, metadata, headings, alt text, and internal linking.
- Google Search Central — Primary source for indexing, sitemaps, robots rules, canonicalization, and Search Console workflows.
- Jekyll Docs — Relevant for GitHub Pages sites built on Jekyll, especially themes, config, and SEO-related plugins.
- Google Search Console Help — Useful for verification, sitemap submission, indexing checks, and troubleshooting.
Reviewed by Lucía Marín, Founding editor.