SEO GitHub Pages
Makes a GitHub-hosted static site crawlable and indexable by search engines through clean page structure, metadata, internal links, and sitemap basics.
If you have ever published a GitHub Pages site and seen no traffic, you already know that search engines need clear signals to understand and rank your pages.
Key points
- Give each page a unique, descriptive title and meta description.
- Place the most important content first under clear headings.
- Use Jekyll SEO plugins to generate a sitemap.xml and submit it to Google Search Console.
- Use internal links to help search engines discover all pages.
- Optimise images with descriptive alt text and efficient formats like WebP.
A developer’s blog that gained traffic after fixing titles
A developer’s blog on GitHub Pages had 50 posts, all with the default title 'Blog'. After setting unique, keyword-rich titles and submitting the sitemap to Search Console, Google indexed 45 posts within two weeks. The developer also applied GitHub SEO basics by adding descriptive alt text to images and fixing broken internal links. Monthly organic visits increased from 200 to 800 in three months, and the site now ranks for 20 long-tail keywords.
Three mistakes that keep your pages from being indexed
- Duplicate titles Using the same title tag on multiple pages confuses search engines about which page is most relevant. Each page should have a unique, descriptive title.
- Accidental noindex Setting
noindexin a page's front matter or via a meta tag tells search engines to skip it entirely. Check your Jekyll configuration and page-level metadata. - Missing sitemap Without a sitemap.xml, search engines may not discover all your pages, especially new or deep ones. Generate a sitemap and submit it in Search Console.
Three things to check for better rankings
- Mobile-friendly design Google uses mobile-first indexing, so your site must render well on phones. Use responsive design and test with Google's Mobile-Friendly Test.
- Image optimisation Descriptive alt text helps search engines understand images. Use efficient formats like WebP and compress images to improve load times.
- Internal linking Linking between your pages helps search engines discover content and understand site structure. Every page should be reachable from the homepage.
Common questions
What is the best static site generator for GitHub Pages?
Jekyll is the default, but Hugo, Astro, and others work. Choose one that produces clean HTML and supports metadata control.
How do I submit a sitemap to Google Search Console?
Generate a sitemap.xml file, place it in the root of your repository, then submit the URL in Search Console under 'Sitemaps'.
How do I avoid blocking search engines on GitHub Pages?
Check that no Disallow directive exists in your root-level robots.txt and that your pages are not marked with noindex in front matter.
Sources
- GitHub Docs — Making content findable in search Covers page structure, titles, and metadata for GitHub-hosted content.
- Google Search Central Official guidance on crawlability, indexing, and mobile-first indexing.
- Jekyll Docs Configuration tips for Jekyll sites, including front matter and sitemap generation.
- Google Search Console Help Instructions for submitting sitemaps and monitoring indexing status.