Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Page Metadata

Every page within the Admin Panel automatically receives dynamic, auto-generated metadata derived from live document data, the user's current locale, and more. This includes the page title, description, og:image, etc. and requires no additional configuration.

Metadata is fully configurable at the root level and cascades down to individual collections, documents, and custom views. This allows for the ability to control metadata on any page with high precision, while also providing sensible defaults.

All metadata is injected into Next.js' generateMetadata function. This used to generate the <head> of pages within the Admin Panel. All metadata options that are available in Next.js are exposed by Payload.

Within the Admin Panel, metadata can be customized at the following levels:

All of these types of metadata share a similar structure, with a few key differences on the Root level. To customize metadata, consult the list of available scopes. Determine the scope that corresponds to what you are trying to accomplish, then author your metadata within the Payload Config accordingly.

Root Metadata

Root Metadata is the metadata that is applied to all pages within the Admin Panel. This is where you can control things like the suffix appended onto each page's title, the favicon displayed in the browser's tab, and the Open Graph data that is used when sharing the Admin Panel on social media.

To customize Root Metadata, use the admin.meta key in your Payload Config:

1
{
2
// ...
3
admin: {
4
meta: {
5
title: 'My Admin Panel',
6
description: 'The best admin panel in the world',
7
icons: [
8
{
9
rel: 'icon',
10
type: 'image/png',
11
url: '/favicon.png',
12
},
13
],
14
},
15
},
16
}

The following options are available for Root Metadata:

Key

Type

Description

defaultOGImageType

dynamic (default), static, or off

The type of default OG image to use. If set to dynamic, Payload will use Next.js image generation to create an image with the title of the page. If set to static, Payload will use the defaultOGImage URL. If set to off, Payload will not generate an OG image.

titleSuffix

string

A suffix to append to the end of the title of every page. Defaults to "- Payload".

[keyof Metadata]

unknown

Any other properties that Next.js supports within the generateMetadata function. More details.

Icons

The Icons Config corresponds to the <link> tags that are used to specify icons for the Admin Panel. The icons key is an array of objects, each of which represents an individual icon. Icons are differentiated from one another by their rel attribute, which specifies the relationship between the document and the icon.

The most common icon type is the favicon, which is displayed in the browser tab. This is specified by the rel attribute icon. Other common icon types include apple-touch-icon, which is used by Apple devices when the Admin Panel is saved to the home screen, and mask-icon, which is used by Safari to mask the Admin Panel icon.

To customize icons, use the admin.meta.icons property in your Payload Config:

1
{
2
// ...
3
admin: {
4
meta: {
5
icons: [
6
{
7
rel: 'icon',
8
type: 'image/png',
9
url: '/favicon.png',
10
},
11
{
12
rel: 'apple-touch-icon',
13
type: 'image/png',
14
url: '/apple-touch-icon.png',
15
},
16
],
17
},
18
},
19
}

For a full list of all available Icon options, see the Next.js documentation.

Open Graph

Open Graph metadata is a set of tags that are used to control how URLs are displayed when shared on social media platforms. Open Graph metadata is automatically generated by Payload, but can be customized at the Root level.

To customize Open Graph metadata, use the admin.meta.openGraph property in your Payload Config:

1
{
2
// ...
3
admin: {
4
meta: {
5
openGraph: {
6
description: 'The best admin panel in the world',
7
images: [
8
{
9
url: 'https://example.com/image.jpg',
10
width: 800,
11
height: 600,
12
},
13
],
14
siteName: 'Payload',
15
title: 'My Admin Panel',
16
},
17
},
18
},
19
}

For a full list of all available Open Graph options, see the Next.js documentation.

Robots

Setting the robots property will allow you to control the robots meta tag that is rendered within the <head> of the Admin Panel. This can be used to control how search engines index pages and displays them in search results.

By default, the Admin Panel is set to prevent search engines from indexing pages within the Admin Panel.

To customize the Robots Config, use the admin.meta.robots property in your Payload Config:

1
{
2
// ...
3
admin: {
4
meta: {
5
robots: 'noindex, nofollow',
6
},
7
},
8
}

For a full list of all available Robots options, see the Next.js documentation.

Prevent Crawling

While setting meta tags via admin.meta.robots can prevent search engines from indexing web pages, it does not prevent them from being crawled.

To prevent your pages from being crawled altogether, add a robots.txt file to your root directory.

1
User-agent: *
2
Disallow: /admin/

Collection Metadata

Collection Metadata is the metadata that is applied to all pages within any given Collection within the Admin Panel. This metadata is used to customize the title and description of all views within any given Collection, unless overridden by the view itself.

To customize Collection Metadata, use the admin.meta key within your Collection Config:

1
import type { CollectionConfig } from 'payload'
2
3
export const MyCollection: CollectionConfig = {
4
// ...
5
admin: {
6
meta: {
7
title: 'My Collection',
8
description: 'The best collection in the world',
9
},
10
},
11
}

The Collection Meta config has the same options as the Root Metadata config.

Global Metadata

Global Metadata is the metadata that is applied to all pages within any given Global within the Admin Panel. This metadata is used to customize the title and description of all views within any given Global, unless overridden by the view itself.

To customize Global Metadata, use the admin.meta key within your Global Config:

1
import { GlobalConfig } from 'payload'
2
3
export const MyGlobal: GlobalConfig = {
4
// ...
5
admin: {
6
meta: {
7
title: 'My Global',
8
description: 'The best admin panel in the world',
9
},
10
},
11
}

The Global Meta config has the same options as the Root Metadata config.

View Metadata

View Metadata is the metadata that is applied to specific Views within the Admin Panel. This metadata is used to customize the title and description of a specific view, overriding any metadata set at the Root, Collection, or Global level.

To customize View Metadata, use the meta key within your View Config:

1
{
2
// ...
3
admin: {
4
views: {
5
dashboard: {
6
meta: {
7
title: 'My Dashboard',
8
description: 'The best dashboard in the world',
9
}
10
},
11
},
12
},
13
}
Next

Swap in your own React components