Skip to content
Yoast SEO for Magento 2
Branch: master
Clone or download
Vincent Hornikx
Vincent Hornikx fix typo
Latest commit b42e29e Aug 27, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
Api rebuild functionality, add support for cms page Apr 11, 2018
Block [Issue-65]: fix base url in snippet preview Jul 10, 2018
Controller remove old references to Location Aug 10, 2018
EntityManager/Operation/Extension/Catalog/Product/Delete added redirecting deleted products to other page Apr 20, 2018
Helper readded frontend output Apr 20, 2018
Model remove old references to Location Aug 10, 2018
Observer readded frontend output Apr 20, 2018
Plugin added category support Apr 12, 2018
Setup create attributes in the SEO group Aug 10, 2018
Ui made attribute group dynamic in product form, search for url_key Apr 12, 2018
etc readded frontend output Apr 20, 2018
view fix typo Aug 27, 2018
.gitignore Creat Code of Conduct MD Jun 6, 2018 Create Jun 6, 2018 fixed typo in documentation Jul 16, 2018
grumphp.yml added field readers and renderers for cms block and wysiwyg content Apr 19, 2018
license.txt Rename LICENSE to license.txt Mar 15, 2018
registration.php Fix email in license headers and change 2016 to 2017 May 4, 2017

Yoast SEO for Magento 2 (by MaxServ)


We have developed this advanced SEO module in close cooperation with YOAST inc. It incorporates the YOAST library into Magento2.


Magento 2.2.* OpenSource. This version of the module has not (yet) been tested on Magento 2 Commerce or Magento 2 Cloud editions.


Proper meta tags

  • ld+json schema data which identifies the page
  • canonical url tag
  • OpenGraph data
  • Facebook configuration data (app id, admin ids)
  • Twitter card data

Live SEO analysis from within the edit forms

When you open an edit form, you'll notice that the default 'Search Engine Optimisation' section has been changed to 'YoastSEO'. Inside this section we have added a live analysis tool. This tool runs a whole battery of tests on your content and shows you the results. Results marked with a green status light are OK, orange means you might want to have a look, while red indicates a problem that you should try to fix immediately.

You'll find the analyis tool in the edit forms of these entities:

  • Categories
  • Products
  • CMS Pages

Customize analysis templates

If you have custom attributes which contain content, we've got you covered. You can edit the analysis templates to include you own custom attributes. Read more on how to configure analysis templates here.

Create redirects for deleted products

Normally a product URL will generate a 404 page after you delete the product. Now you can configure what should happen yourself. Choose between redirecting to the product's category page, a fixed category page or a CMS page of your choice. Or, if you want, you can choose not to create redirects.


This module can be installed using composer.


If you have access to packagist (and by default you do), all you need to do is run this require statement.

composer require maxserv/magento-module-yoastseo


If you do not have access to packagist, you need to add our GitHub repository to your composer configuration before you can require this module:

composer config repositories.yoastseo git
composer require maxserv/magento-module-yoastseo


If for some reason you can't use composer then please follow these steps:

  1. Browse to the releases section on our GitHub page
  2. Download the latest release in zip or tar format
  3. Create a directory in your project: app/code/MaxServ/YoastSeo
  4. Unpack the package into that directory


You can find the configuration by navigating to Stores -> Configuration in the main menu. In the configuration sections select 'YoastSEO' and then click on 'SEO Settings'.

Analysis templates

You can find the analysis templates by navigating to Marketing -> YoastSEO -> Analysis Templates using the main menu.

Template format

The template consists of plain HTML and placeholders for attributes. Placeholders are defined with double handlebars:

{{<attribute_code>[ reader='<reader>'][ provider='<provider>'][ default='<default>']}}
Part Possible values
<attribute_code> Any valid attribute code (with some exceptions)
<reader> text,wysiwyg,cms_block,category_landing_page
<provider> product_images
<default> Any value

At least one of <reader>, <provider> or <default> must be configured.



The text reader returns the literal value of the input field component. The value will not be processed.


The value of the input field component will be rendered using frontend rendering. This ensures that any placeholders (e.g. widget placeholders) in the content will be expanded before analysis.

CMS Block

The value of the the input field component should be the numerical identifier of a CMS block. If it is, the CMS block will be rendered using frontend rendering.

Category Landing Page

Can only be used in category forms, and will only render anything if the category display mode has been set to either 'Static block only' or 'Static block and products'. If this is the case, this reader will pull content from the 'Add CMS Block' field in the 'Content' section of the category form.


Use a provider in conjunction with a nonexistent attribute code to provide data to the template processor which can not be read from other form fields. A provider should return plain HTML which requires no more processing.

Product Images

The product images provider reads the product media gallery and renders the images as <img /> tags.

Template processing

For each placeholder, the template processor will try to retrieve content based on the placeholder configuration. The following steps are treated in an if, else if, else if, else manner

  • If a form input component can be found based on the attribute code, and a reader has been defined, the template processor will instruct the reader to process the input component's value.
  • If a form input component can be found based on the attribute code, the input component's value is returned.
  • If a form input component could exist but doesn't exist yet (JIT fieldset rendering), and the entity already had a value for that attribute code, then that value is returned.
  • If a provider has been configured, the provider is instructed to return a value. The attribute code does not have to exist.
  • If the placeholder has a default value configured, the default value is returned. The attribute code does not have to exist.
  • A blank value is returned.
You can’t perform that action at this time.