---
title: "Audit URL"
description: "Defaults to the page's preview URL so even drafts get checked – override per blueprint when you need a custom target."
canonical_url: "https://kirby.tools/docs/seo-audit/guide/audit-url"
---

# Audit URL

> Defaults to the page's preview URL so even drafts get checked – override per blueprint when you need a custom target.

Resolves to the same URL as the Panel's open button – draft pages, custom hostnames, and per-language variants are all in scope.

## Model Support

The plugin works with any Kirby model that has a `previewUrl` method:

- **Pages**: Analyze individual page content.
- **Site**: Check site-level SEO (homepage, etc.).

## 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:

```yaml [pages/default.yml]
options:
  preview: https://getkirby.com/features/developers

sections:
  seoAudit:
    type: seo-audit
```

This is particularly useful for:

- Analyzing external URLs
- Testing staging environments
- Checking specific URL variations

## Cross-Origin Analysis

When the preview URL origin differs from the Panel origin, the Panel posts the page's Panel path to the plugin's proxy route, and Kirby resolves the preview URL server-side before fetching it – that avoids CORS errors. Same-origin URLs are fetched directly in the browser.

## Language-Specific Analysis

Switching the Panel language refetches the preview URL, so a secondary language is analyzed against its translated page.

<callout color="info" icon="i-ri-information-line" to="/docs/seo-audit/guide/assessments#language-specific-features">

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

</callout>

## Debugging URL Resolution

To understand which URL is being analyzed, you can enable debug logging:

```php [config.php]
return [
    'johannschopplich.seo-audit' => [
        'logLevel' => 'info'
    ]
];
```

This will log information about the resolved preview URL and the HTML extracted for analysis. You can inspect these logs in your browser's developer console.

---

Every page of this site as Markdown: <https://kirby.tools/sitemap.md>
