---
title: "Snippet Preview"
manual: "Yoast SEO for TYPO3"
version: "main"
permalink: "https://docs.typo3.org/permalink/yoast-seo-for-typo3/yoast_seo:snippetpreview@main"
source: "Configuration/SnippetPreview/Index.rst"
rendered: "2026-11-04T08:23:39+00:00"
---

# Snippet Preview {#snippetpreview}

## Enable snippet preview on specific page types {#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`](https://docs.typo3.org/m/typo3/reference-coreapi/14.3/en-us/ExtensionArchitecture/FileStructure/ExtLocalconf.html#file-extension-ext-localconf-php) of your own extension.

```php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['yoast_seo']['allowedDoktypes']['blog'] = 137;
```

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 PageTSConfig {#disable-snippet-preview-with-pagetsconfig}

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 PageTSConfig. Below is an example of how to hide the snippet preview if the page is a subpage of page with id 4.

```typoscript
[4 in tree.rootLineParentIds]
    mod.web_SeoPlugin {
        disableSnippetPreview = 1
    }
[global]
```

## Basic auth configuration {#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']`

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