# SEO Checks

The SEO checker lets you put in a Url and run specific checks on the page to make sure you are using best practices. It's also part of the SEO Property.

<figure><img src="/files/JT8JDu4iZwJRzKz8ikLR" alt=""><figcaption><p>SEO Checker built into the SEO Property</p></figcaption></figure>

The SEO Checker comes with a number of checks out of the box, but you can easily create your own. Just create a class that implements ISeoCheck

```csharp
public interface ISeoCheck
{
    string Name { get; }
    Task<SeoCheckResult> Check(string url, HtmlDocument document, Content.Models.Content content);
    int SortOrder { get; }
}
```

The example below shows the built in H1 checker that checks if the H1 is missing or if you have more than one H1 tag.

```csharp
public class HeadingOneSeoCheck : ISeoCheck
{
    public string Name => "H1 Checker";
    public Task<SeoCheckResult> Check(string url, HtmlDocument document, Content.Models.Content content)
    {
        var result = new SeoCheckResult(Name);
        var seoItem = new SeoCheckResultItem();

        // Select all H1 elements
        var h1Tags = document.DocumentNode.SelectNodes("//h1");

        if (h1Tags == null || h1Tags.Count == 0)
        {
            seoItem.Status = SeoCheckStatus.Error;
            seoItem.Message = "Page is missing an <h1> heading tag.";
            result.Items.Add(seoItem);
        }
        else if (h1Tags.Count > 1)
        {
            seoItem.Status = SeoCheckStatus.Warning;
            seoItem.Message = $"Page contains multiple <h1> tags ({h1Tags.Count}). Consider reducing to one for better SEO.";
            result.Items.Add(seoItem);
        }


        return Task.FromResult(result);
    }
    
    public int SortOrder => 1;
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aptitude.gitbook.io/zaubercms/extending-zaubercms/seo-checks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
