Search engine optimization for GitHub Pages

GitHub Pages can optimize your site for search engines and social media networks, using the Jekyll SEO tag plugin.

GitHub Pages is available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see "GitHub's products."

Setting up

To enable the Jekyll SEO tag plugin, you must add the following line to your site's _config.yml file:

  - jekyll-seo-tag

If you don't have a _config.yml file, you will need to create one in the root of your GitHub Pages repository. For more information, see Jekyll's official plugins documentation.

To tell the plugin where to put your meta tag information, you must add the SEO tag right before </head> in your site template files. For example, in _layouts/_default.html:

    {% include head.html %}
    {% seo %}

Customizing meta tags

You can add meta tags for titles, descriptions, and several other attributes by editing your site's _config.yml file or by updating the front matter of your site files. For more information, see the Jekyll SEO plugin's reference guide on using meta tags.

Further reading

Ask a human

Can't find what you're looking for?

Contact us