PageTree demo by

Editing pages

SEO

Each page has its own SEO settings, grouped in three sections. Fields left empty fall back to other values.

Open the SEO settings

In the page tab, click SEO in the toolbar. A dialog opens. Click Apply to close it, then save the page.

Search engines

This section controls how the page appears in search results.

FieldAdvice
Meta Title50 to 60 characters. Empty: the page title is used.
Meta Description120 to 160 characters. Summarize the page content.

Below these fields, the Search result preview shows the likely result and counts the characters of the title and the description.

Social sharing

This section controls how the page appears when it is shared (Open Graph, Twitter/X).

FieldAdvice
Open Graph TitleEmpty: the meta title is used.
Open Graph DescriptionEmpty: the meta description is used.
Open Graph Image1200 × 630 px recommended. Empty: the default sharing image from the settings is used.
Twitter/X cardAutomatic (large image when an image is available), Summary, or Summary with large image.

Indexing

This section controls how search engines crawl and index the page.

FieldPurpose
RobotsDefault (from the settings), or a combination of index / do not index and follow / do not follow links.
Canonical URLFill it in only if the page duplicates another address. Empty: the page address is used.
Exclude from sitemapThe page stays accessible but must not be listed in the sitemap.

Fallback values

When a field is empty, PageTree uses the following value:

ValueIf empty, falls back to
Meta titlePage title
Open Graph titleMeta title
Open Graph descriptionMeta description
Open Graph imageDefault sharing image from the settings
RobotsDefault robots from the settings
Twitter/X cardLarge image when an image is available, otherwise Summary
Canonical URLPage address

The default values (site name, title template, robots, Twitter/X account, sharing image) are set in the settings.

The sitemap

PageTree does not generate a sitemap file itself. It provides the information your sitemap generator needs:

  • a page is a sitemap candidate if it is visible on the website, is not marked Exclude from sitemap and is not noindex (directly or through the default robots from the settings);
  • in code, this rule is available through the inSitemap() scope of the page model:
use LucasPalomba\PageTree\Models\Page;

$pages = Page::inSitemap()->get();

In a template, the value can also be read from this.page.apiBag.pagetree_seo.exclude_from_sitemap.

Output in the theme

The SEO tags are written by your theme layout. Your developer can use the native page properties (this.page.meta_title…) or the pageTreeSeo component, which renders all the tags. See Theme integration.