Yoast SEO for TYPO3

Extension key

yoast_seo

Package name

yoast-seo-for-typo3/yoast_seo

Version

11.1

Language

en

Author

MaxServ, Yoast & Contributors

License

This document is published under the Open Publication License.

Rendered

Tue, 01 Jul 2025 14:13:06 +0000


Optimize your website for search engines with Yoast SEO for TYPO3. This extension integrates the text analysis and rating of Yoast SEO into the TYPO3 CMS interface. The content analysis can generate interesting metrics about a text and give you a score that can be used to improve the text and help editors write high quality content.


Table of Contents:

What does it do?

This extension brings the content analyzer tools from YoastSEO to the interface of TYPO3 CMS. This Content analysis can generate interesting metrics about a text and give you an assessment which can be used to improve the text. Besides that you can set a focus keyword for every page. The content analyzer takes this into account and lets you know if your copy uses it properly.

Every page includes a snippet preview which shows you how that page will show up in the search results. The title of the page and description displayed along can easily be modified in the editor.

For your most important pages there is the option of marking this as "Cornerstone" content. This will have impact on how the content analysis analyzes your page.

The "Overview" module gives you an overview of all the pages which are marked as "Cornerstone". This module also provides a list of pages without a meta description so you can easily see the pages you have to improve.

Furthermore it brings a basic implementation of structured data (schema.org). By default it renders the needed JSON for the schema.org types "BreadcrumbList" and "WebSite".

The latest release for Yoast SEO For TYPO3 brings these features:

  • Add synonyms for your focus keyword
  • Add related keyphrases with their own synonyms and analysis results
  • Get internal linking suggestions within your content elements so you're sure that your content is properly linked together
  • Get insights of your page so you know what the prominent words on your page are
  • Set advanced robot instructions for "Image index", "Archive" and "Snippet"
  • Find "Orphaned content", pages which have no internal links to them (within the Overview module)
  • Add widgets to your Dashboard: Pages without meta description, Orphaned content

Contribution

Anyone is welcome to contribute to Yoast SEO for TYPO3.

There are various ways you can contribute:

  • Raise an issue on GitHub.
  • Create a pull request with your bug fixes or new features.
  • Improve this documentation via the "Edit on GitHub" workflow.

Please read the guidelines on how to contribute to this repository and how to report bugs, and take a look at the "Development" page for setting up a local development environment.

Installation guide

Install the extension using your preferred method, TypoScript include is handled automatically.

Head over to your CLI and run the following command

composer require yoast-seo-for-typo3/yoast_seo
Copied!

Not using composer? Download the zip file from the TER and upload it through the Extension Manager.

After installing it's necessary to flush the system caches and run the Database Analyzer within the Install Tool.

Permissions

Access rights

Through the "Access lists" of backend users and groups it's possible to configure access for:

  • All the Yoast SEO fields within pages
  • The backend modules
  • The Dashboard widgets

Snippet Preview

Enable snippet preview on specific page types

By default, the snippet preview is only shown on pages with doktype 1 (Standard page) and 6 (Backend user section). You can add your own doktypes like the example below by adding a doktype to the $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['yoast_seo']['allowedDoktypes'] array in the ext_localconf.php of your own extension.

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['yoast_seo']['allowedDoktypes']['blog'] = 137;
Copied!

The key can be any unique string. It is only used to identify the doktype as a developer. The value contains the numeric value of the doktype.

Disable snippet preview with PageTs

Sometimes only a check on doktype isn't enough for disabling the snippet preview. For example if you want to hide the snippet preview on detail pages of for example a news item, you need more than a check on a doktype. That is why you can also disable the snippet preview based on PageTs. Below is an example of how to how the snippet preview if the page is a subpage of page with id 4.

[4 in tree.rootLineParentIds]
    mod.web_SeoPlugin {
        disableSnippetPreview = 1
    }
[global]
Copied!

Basic auth configuration

For environments which are protected by Basic auth, it's possible to set username and password through $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['yoast_seo']['previewSettings']['basicAuth']

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['yoast_seo']['previewSettings']['basicAuth'] = [
    'username' => 'authUsername',
    'password' => 'authPassword'
];
Copied!

Structured data

Yoast SEO provides structured data (schema.org) rendering in the frontend. This is done through providers.

You can find all configured providers in typoscript within config.structuredData.providers

WebSite

The output for the type WebSite is provided by the provider key site.

An example output for this provider is:

[
    {
        "@context": "https://www.schema.org",
        "@type": "WebSite",
        "url": "https://example.com/",
        "name": "Example"
    }
]
Copied!

This provider does not have any configurable options.

Disabling provider(s)

If you want to disable a certain provider, you can do this by unsetting the provider key through typoscript. Example:

config.structuredData.providers.breadcrumb >
Copied!

Custom provider

It is possible to register a custom provider. For this, it's necessary to create a class which implements the StructuredDataProviderInterface and provides a method getData which returns a multidimensional array. An example:

<?php
namespace Vendor\Package\StructuredData;

class CustomStructuredDataProvider implements \YoastSeoForTypo3\YoastSeo\StructuredData\StructuredDataProviderInterface
{
    public function getData(): array
    {
        return [
            [
                '@context' => 'https://schema.org',
                '@type' => 'Person',
                'name' => 'John Doe',
                'email' => 'john@doe.com'
            ]
        ];
    }
}
Copied!

After you have created the class, you can add it to the provider-list by registering it through typoscript:

config.structuredData.providers {
    custom {
        provider = Vendor\Package\StructuredData\CustomStructuredDataProvider
    }
}
Copied!

If you want to have custom configuration with your provider, you can add a method setConfiguration which will be automatically called if available.

Example:

protected $configuration = [];

public function setConfiguration(array $configuration): void
{
    $this->configuration = $configuration;
}
Copied!

Structured data provider ordering

If you want to order the rendering of the providers, you can make use of the before and after settings.

If, for example, you want your custom provider to be rendered before breadcrumb and after site:

config.structuredData.providers {
    custom {
        provider = Vendor\Package\StructuredData\CustomStructuredDataProvider
        before = breadcrumb
        after = site
    }
}
Copied!

Typoscript provider

It is possible to configure structured data through typoscript.

This is done through the config.structuredData.data object. The type and context keys do not need a @ and stdWrap is available on all keys.

An example for this configuration:

config.structuredData.data {
    10 {
        context = https://schema.org
        type = Person
        name = TEXT
        name.data = field:author
        email = TEXT
        email.data = field:author_email
    }
}
Copied!

Other Plugins

By default the SEO analysis is only done on pages. If you want more type of records to use the SEO functions, these are two ways of accomplishing this:

Required: adding PageTsconfig preview configuration

One important thing to know is that the snippet preview of records other than pages, only works when you have set a proper preview link. This is needed for both of the solutions above. The only thing you need to do is set some PageTsconfig. More information about the configuration of the preview links can be found in the documentation.

An example configuration of the preview links for EXT:news records is:

TCEMAIN.preview {
    tx_news_domain_model_news {
        previewPageId = <YOUR_DETAIL_PAGE_ID_HERE>
        useCacheHash = 1
        useDefaultLanguageRecord = 0
        fieldToParameterMap {
                uid = tx_news_pi1[news_preview]
        }
        additionalGetParameters {
                tx_news_pi1.controller = News
                tx_news_pi1.action = detail
        }
    }
}
Copied!

Automatic functionality for records

What does the automatic functionality do?

By using the automatic functionality the following will be added to your records:

  • Backend:
    • Fields of the core SEO extension:
      • SEO title
      • Robots: Index this page, Follow this page
      • Opengraph fields: Title, Description, Image
      • Twitter fields: Title, Description, Image, Card
      • Canonical link
      • Sitemap: Change frequency, Priority
    • Functionality of Yoast SEO:
      • Snippet preview
      • Title and Description progress bar
      • Readability Analysis
      • SEO Analysis
      • Focus keyword
      • Advanced robots: Image index, Archive, Snippet
  • Frontend:
    • Metatag tags:
      • Description
      • Opengraph
      • Twitter
      • Robots
    • Canonical generation
    • Page title based on SEO Title and Title field

Configuration for a record

To get all the functionality mentioned above you only have to set the table name and the GET parameters on which it responds to. This should be placed in a file within Configuration/TCA/Overrides of your extension (f.e. sitepackage):

<?php

\YoastSeoForTypo3\YoastSeo\Utility\RecordUtility::configureForRecord('tx_extension_record')
     ->setGetParameters([
         ['tx_extension_pi1', 'record']
     ]);
Copied!

This will automatically set the TCA, Database fields and activate the frontend functionality.

Configuration options

The method configureRecord returns an object which has the following methods:

setGetParameters

Datatype
array
Default
none
Description
The GET parameters on where the frontend functionality should be activated. This should be a multidimensional array, which gives you the possibility to react to multiple situations.

Example

->setGetParameters([
   ['tx_extension_pi1', 'record'],
   ['tx_extension_pi1', 'record_preview']
])
Copied!

setDefaultSeoFields

Datatype
boolean
Default
true
Description
This will define if the default fields from EXT:seo should be added.

setYoastSeoFields

Datatype
boolean
Default
true
Description
This will define if the fields from Yoast SEO should be added.

setSitemapFields

Datatype
boolean
Default
true
Description
This will define if the fields "Change frequency" and "Priority" for Sitemap should be added.

setTypes

Datatype
string
Default
empty (all types)
Description
Defines on which types of the record the fields should be added.

setTitleField

Datatype
string
Default
title
Description
Sets the title field to another column.

setDescriptionField

Datatype
string
Default
description
Description
Sets the description field to another column.

setAddDescriptionField

Datatype
boolean
Default
false
Description
Adds the description column to both TCA and database (in case there's none already).

setFieldsPosition

Datatype
string
Default
after:title
Description
Sets the position of the TCA fields.

setOverrideTca

Datatype
array
Default
none
Description
Override TCA of the complete table. This can be useful if you want to change something of the TCA of the EXT:seo or Yoast SEO fields. This is needed because the automatic TCA generation is executed after all generated TCA, so trying to add this to one of the Overrides files will not take effect.

Example

->setOverrideTca([
   'columns' => [
      'seo_title' => [
         'config' => [
            'max' => 100
         ]
      ]
   ]
])
Copied!

setGeneratePageTitle

Datatype
boolean
Default
true
Description
This will enable/disable the functionality of the Page Title Provider in the frontend.

setGenerateMetaTags

Datatype
boolean
Default
true
Description
This will enable/disable the rendering of the metatags in the frontend (in case you want to this yourself). This will not deactivate the canonical tag.

setGenerateRobotsTag

Datatype
boolean
Default
true
Description
This will enable/disable the rendering of the robots metatag in the frontend (in case you always want the robot settings from the page it's displayed on).

Example with EXT:news

EXT:news has his own sitemap fields and has multiple GET parameters to respond to. The basic configuration can be:

\YoastSeoForTypo3\YoastSeo\Utility\RecordUtility::configureForRecord('tx_news_domain_model_news')
     ->setGetParameters([
         ['tx_news_pi1', 'news'],
         ['tx_news_pi1', 'news_preview']
     ])
     ->setSitemapFields(false)
     ->setFieldsPosition('after:bodytext');
Copied!

Adding PageTsconfig

Make sure to add the needed PageTsconfig mentioned in Other Plugins

Manual configuration for records

How to integrate in other plugins

By default the SEO analysis is only done on pages. If you want more type of records to use the SEO functions from Yoast SEO you have to add some fields to the TCA.

$llPrefix = 'LLL:EXT:yoast_seo/Resources/Private/Language/BackendModule.xlf:';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
    'tx_news_domain_model_news',
    [
        'tx_yoastseo_snippetpreview' => [
            'label' => $llPrefix . 'snippetPreview',
            'exclude' => true,
            'displayCond' => 'REC:NEW:false',
            'config' => [
                'type' => 'none',
                'renderType' => 'snippetPreview',
                'settings' => [
                    'titleField' => 'alternative_title',
                    'descriptionField' => 'description'
                ]
            ]
        ],
        'tx_yoastseo_readability_analysis' => [
            'label' => $llPrefix . 'analysis',
            'exclude' => true,
            'config' => [
                'type' => 'none',
                'renderType' => 'readabilityAnalysis'
            ]
        ],
        'tx_yoastseo_focuskeyword' => [
            'label' => $llPrefix . 'seoFocusKeyword',
            'exclude' => true,
            'config' => [
                'type' => 'input',
            ]
        ],
        'tx_yoastseo_focuskeyword_analysis' => [
            'label' => $llPrefix . 'analysis',
            'exclude' => true,
            'config' => [
                'type' => 'none',
                'renderType' => 'focusKeywordAnalysis',
                'settings' => [
                    'focusKeywordField' => 'tx_yoastseo_focuskeyword',
                ]
            ]
        ],

    ]
);
Copied!

In the example above, you see we define four fields for in this case the EXT:news records.

The first field with renderType snippetPreview, is the field for the snippet preview. In the settings section, you have to define which fields contains the SEO title and the description. The snippet preview will use these fields to show you your search result will look like. Make sure the fields that are set, do exist. This field doesn't need a column in the database.

The second field doesn't need much configuration. Just add a field with renderType readabilityAnalysis to have the readabilityAnalysis in your record. This field also doesn't need a column in the database.

To have your content checked for SEO, you have to set a focus keyword, so we need to add that field as well. This can be a simple text field. This is the only field that needs a column in the database. Make sure you add this field to the database table for your records. For the news table this would be the following within the ext_tables.sql of your extension:

CREATE TABLE tx_news_domain_model_news (
    tx_yoastseo_focuskeyword varchar(100) DEFAULT '' NOT NULL,
);
Copied!

To show the focus keyword analysis, we need to add a field of renderType focusKeywordAnalysis. In the settings section you have to define the field you have created with the focus keyword. This field also doesn't need a column in the database.

Adding PageTsconfig

Make sure to add the needed PageTsconfig mentioned in Other Plugins

Event

Event to change the URL to analyse

By default the extension is generating the URL to analyse based on the Site Configuration and configured Route Enhancers. In some cases you want to change the URL that needs to be analysed. With the ModifyPreviewUrlEvent, you will be able to alter the URL that will be used to analyse your content.

First you need to create an EventListener that will :

<?php

namespace Vendor\Package\EventListener;

use YoastSeoForTypo3\YoastSeo\Event\ModifyPreviewUrlEvent;

final class ModifyPreviewUrlEventListener
{
    public function __invoke(ModifyPreviewUrlEvent $event)
    {
        $url = $event->getUrl();
        $site = $event->getSite();
        $pageId = $event->getPageId();
        $languageId = $event->getLanguageId();

        // Create a new url based on your needs

        $event->setUrl($newUrl);
    }
}
Copied!

After you created your event listener to alter the URL, you need to register it in your Services.yaml.

Check the TYPO3 documentation for your used TYPO3 version on how to register this correctly.

After you have registered the listener, you need to clear the TYPO3 cache through the Maintenance module (or vendor/bin/typo3 cache:flush) before your code will be activated.

Snippet preview

Where can I find the snippet preview?

The snippet preview is located in 2 places.

By default it is rendered within the page module above your content: |img-snippetpreview-page|

You can also find the snippet preview within the SEO tab of the page properties: |img-snippetpreview-properties|

What information is used for the snippet preview?

Title

The title is being generated based on your page title (General tab), overridden by the "Title for search engines" (SEO tab).
Based on your frontend configuration the website title gets prepended or appended.

Description

This uses the content from the "Description" field under the SEO tab.
A default placeholder is shown when there is no description available.

Favicon and URL

The favicon and url are generated from the frontend information.
If there's no favicon available (shortcut icon) the default favicon.ico from the root is rendered.

Can I disable the snippet preview?

There are two ways to disable the snippet preview within the page module:

On a specific page
If you want to disable the snippet preview for a specific page, you can set the property "Hide Yoast SEO snippet preview in page module for this page" under the "Social media" tab:

|img-snippetpreview-hide-page|

Disabling globally
If you want to globally disable the rendering of the snippet preview within the page module, you can set this within your user settings:

|img-snippetpreview-hide-global|

Content Analysis

Where can I find the analysis?

Within the page module

On top of the page module you will find the "Readability" and "SEO" analysis: |img-analysis-page|

You can click on a particular analysis to see more information about problems, improvements and which tests have passed: |img-analysis-readability|

|img-analysis-seo|

Within the page properties

Within the page properties the analyses are not clickable, but the results are shown at the appropriate place. Both results are shown under the SEO tab.

The Readability analysis can be beneath the Description field

The SEO analysis can be found beneath the Focus keyphrase field.

Insights

Within the SEO tab you'll find the "Insights" information.
This is a list of the most prominent words on your page.

An example of a prominent words list:

|img-insights|

Focus keyphrases

It is very import to set the correct focus keyphrase(s) for your page, this can be done within the page properties.

Focus keyphrase

Within this field you set the main focus of the page, for example "bike".

The value of this field will be taken into account with the content analysis, to make sure your content matches what you want to focus on.

Synonyms

You have the possibility to add synonyms for your focus keyphrase.
Using synonyms is a way to help users understand your copy better and search engines will recognize these synonyms too.
This can be a comma separated list of synonyms.

For example: "bicycle, cycle, ride, two-wheeler".

Overview module

Yoast SEO ships with an extra backend module "Overview".
This module contains multiple views where you can see certain pages in one single overview.
For every page you can immediately see the Readability and SEO analysis.

Cornerstone content

This shows a list of all the pages marked as "Cornerstone content" within your installation.

Pages without meta description

All pages without a meta description will be listed here.
It is important to keep this list as small as possible.

Orphaned content

All Orphaned content will be listed here.

Linking suggestions

Internal linking is a vital part of your website, not only is this important for your visitors but also for SEO.
It creates relations between pages and determines what pages are important.

Yoast SEO for TYPO3 generates internal linking suggestions for you, based on the current site you're working on.
These are calculated with an internal search engine which searches for the most related pages, based on the prominent words and cornerstone content.

Below each text editor of (standard) content elements you can find a list of suggestions.
Behind each suggestion is a status column to let you know if you already have a link to that page.

Example:

|img-linking-suggestions|

Advanced robot instructions

Yoast SEO For TYPO3 provides 3 extra "Robots" settings, besides "Index this page" and "Follow this page".

You can find these settings at the bottom of the SEO tab:

|img-robots|

Find out more about these advanced settings.

Development

Local environment with DDEV

In this repository we added a DDEV setup so you can easily test your contributions in all the TYPO3 versions the extension should work with.

First of all, make sure you have installed DDEV and Docker. See the DDEV documentation how to do that. After you have installed DDEV, run the following command in the root of this repository.

ddev start
Copied!

After the setup is started, you can use the following command to make sure all installations are up and running.

ddev install-all
Copied!

When the script is finished, you can go to https://yoast-seo.ddev.site and check the TYPO3 installations that are available to test your work.

Instances

The following instances will be up and running for you after you have installed the DDEV setup.

Login

You will be able to login to the backend of the instances above, by using the following credentials:

Username

admin

Password

password

Reset setup

You want to reset the instances? Use the following two commands. Be aware that this will also reset the databases!

ddev rm -O -R
Copied!

and after that:

rm -rf .Build/v11 .Build/v12 .Build/v13
Copied!

If you change the code, you can directly see the changes in all the installations of your DDEV setup.

Thanks to Armin Vieweg for this example DDEV setup for TYPO3 extensions.

Sitemap

Index