Preview URL

The analysis reads the page's preview URL, unsaved changes included – override the target per blueprint when you need a different one.

The analysis reads the preview URL of the version it looks at: the unsaved changes while the form differs from the published content, otherwise the published page. Draft pages, custom hostnames, and per-language variants are all in scope. A page without a preview URL cannot be analyzed: its blueprint sets options.preview: false, or the editor's role lacks the preview permission.

Model Support

The plugin works with pages and the site:

  • Pages: Analyze individual page content.
  • Site: Analyze the site through its preview URL, the home page.

Custom Target URL

In certain cases, you might want to customize the target URL used to generate the SEO report. This can be done by adding a preview option to the model's blueprint:

pages/default.yml
options:
  preview: https://getkirby.com/features/developers

sections:
  seoAudit:
    type: seo-audit

While the form has unsaved changes, the URL carries Kirby's _version=changes and _token query, so a frontend that ignores them renders the published content.

This is particularly useful for:

  • Analyzing external URLs
  • Testing staging environments
  • Analyzing specific URL variations

Cross-Origin Analysis

A preview URL on the Panel's own origin is fetched by the browser. Any other origin is fetched by Kirby on the server, so CORS never applies – the proxy settings in the global configuration apply only to that fetch.

Language-Specific Analysis

On multi-language sites, the analysis targets the preview URL of the language selected in the Panel, so a secondary language is analyzed against its translated page.

Which assessments run depends on the lang attribute of the rendered page – see Assessments for SEO and Readability.

Debugging URL Resolution

When the preview URL cannot be reached or returns an error status, the analysis stops with an error that names the URL actually fetched. The browser console always shows the URL the analysis starts from, which is the preview URL before any urlResolver rewrite. To see the HTML extracted from the fetched page, set logLevel to info.