Jekyll SEO
Configures a Jekyll static site with clean metadata, crawlable structure, and performance-friendly defaults to help search engines understand and rank it.
If you have installed jekyll-seo-tag but forgot the {% seo %} tag in your layout, you already know a plugin alone does nothing.
Key points
- Add the
jekyll-seo-tagplugin and place{% seo %}in your layout<head>to auto-generate metadata. - Use the
jekyll-sitemapplugin to produce asitemap.xmlthat helps search engines discover your pages. - Set a
robots.txtfile that points to your sitemap and does not block important pages. - Ensure every page has a unique title, meta description, and canonical URL to prevent duplicates.
- Optimise images with descriptive
alttext, sensible filenames, and compressed file sizes.
A missing Liquid tag costs rankings
You build a Jekyll site for a local bakery and install jekyll-seo-tag but forget the {% seo %} tag in your default layout. The site goes live on SEO GitHub Pages, and months later Google shows your pages with auto-generated snippets pulled from page text, missing your carefully written meta descriptions. A Google Search Console crawl reveals that canonical URLs, part of canonical SEO, are not set, so duplicate versions of the same page compete. Adding the tag fixes metadata and canonicals in one deploy.
Three ways it goes wrong
- Plugin installed, tag missing The jekyll-seo-tag gem does nothing until you place
{% seo %}in your layout<head>. Without it, no metadata is emitted. - Page without a unique title Jekyll pages need a
titlein front matter or a fallback from the plugin; otherwise, every page gets the site title alone. - Sitemap or robots blocked A missing or misconfigured
robots.txtcan hide your sitemap from crawlers, or worse, block important pages like your blog index. This is a classic robot SEO mistake.
Three things you must check
- Verify the plugin is active Check your
Gemfileand_config.ymlto ensurejekyll-seo-tagis listed and{% seo %}appears in your layout file. This also verifies canonical SEO setup works as expected. - Expose the sitemap Add
jekyll-sitemapto yourGemfile, then confirmsitemap.xmlis reachable and listed inrobots.txtfor Google. Ensure that file does not accidentally block important sections. - Fill in front matter Every page and post should have
title,description, andcanonicalset in front matter or via plugin defaults. Missing these means Google guesses your intent.
Common questions
What is the best Jekyll SEO plugin?
The most common is jekyll-seo-tag for metadata, combined with jekyll-sitemap for the sitemap. Both are maintained by the Jekyll team.
Does Google prefer Jekyll sites for SEO?
No, but static Jekyll sites can load faster and have fewer crawl errors than dynamic sites, which helps rankings indirectly.
How do I add a canonical tag in Jekyll?
Use the jekyll-seo-tag plugin with canonical set in front matter, or configure a default in _config.yml.
Sources
- Jekyll SEO Tag Official plugin documentation for metadata generation.
- Jekyll Sitemap Repository and usage guide for sitemap generation.
- Google Search Central Current guidance on search behaviour and technical SEO.