# How to setup kirby3 seo plugin in details

**URL:** <https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107>\
**Category:** Questions\
**Created:** [November 21, 2020, 3:57pm UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107 "2020-11-21T15:57:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![John2202](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@John2202](https://forum.getkirby.com/u/John2202)\
**Post date:** [November 21, 2020, 3:57pm UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/1 "2020-11-21T15:57:20Z")

</div>

Hi everyone, I need help on how to setup SEO plugin in kirby3, I have never used SEO on any of the kirby website i developed, This is my first time and It’s over 2 days since I have been trying to figure it out.

1. Page doesn’t load when seo snippet is placed in the template.
2. How to manage it using panel.

I need help please

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [November 21, 2020, 8:08pm UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/2 "2020-11-21T20:08:18Z")

</div>

Which plugin? Please post your code!

---

<div class="post-metadata">

**Author:** ![John2202](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@John2202](https://forum.getkirby.com/u/John2202)\
**Post date:** [November 21, 2020, 8:34pm UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/3 "2020-11-21T20:34:38Z")

</div>

\<?php return function ($page, $kirby, $site) { // SEO $seo = $kirby-\>controller('seo' , compact('page', 'site', 'kirby')); return $seo; };

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [November 21, 2020, 10:43pm UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/4 "2020-11-21T22:43:39Z")

</div>

Have you followed the instruction from the readme?

@jimbobrjames That’s probably your plugin?

---

<div class="post-metadata">

**Author:** ![John2202](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@John2202](https://forum.getkirby.com/u/John2202)\
**Post date:** [November 22, 2020, 3:47am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/5 "2020-11-22T03:47:57Z")

</div>

yes, i do not understand the readme because I followed everything in there, but it gives error and the page fails to load.

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [November 22, 2020, 5:34pm UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/6 "2020-11-22T17:34:51Z")

</div>

@texnixe Yup its mine 🙂

@John2202 At the very least, you need to create a controller for each page template, and drop the following into it:

```auto
<?php

return function ($page, $kirby, $site) {

  // SEO
  $seo = $kirby->controller('seo' , compact('page', 'site', 'kirby'));

  return $seo;

};

```

Then snippet will work (you should put the snippet inside the head tag). If you can give me more detail about the error you are getting, I will do my best to help you.

For inner pages, you probably want to customise things like the page title. You can do that by overiding the variables in the controller for that template:

```auto
<?php

return function ($page, $kirby, $site) {

  // Meta
  $seo = $kirby->controller('seo' , compact('page', 'site', 'kirby'));

  // Override Meta Title
  $metatitle = $page->seotitle().' | '.$site->title();

  $data = compact('metatitle');

  return a::merge($seo, $data);

};

```

Lastly, add the Blueprint to you own blueprints. The one in the plugin is meant to be used as a tab.

Here is a complete list of the things you overide in the controllers, along with the default values for reference:

```auto
// Meta
'metatitle' => $site->title(),
'metadesc' => $page->seometa(),
'metakeywords' => $page->seotags(),
'metarobots' => 'index, follow, noodp',
'metaurl' => $site->url(),
'metaimage' => $page->shareimage()->toFile() ? $page->shareimage()->toFile()->crop(1280, 720)->url() : ' ',

// Facebook Meta
'metafbtype' => 'website',
'metafbsitename' => $site->title(),
'metafblocale' => 'en_GB',

// Twitter Meta
'metatwcard' => 'summary_large_image',
'metatwsite' => $site->socialtwitterurl()->isNotEmpty() ? $site->socialtwitterurl() : ' ',
'metatwcreator' => $site->twittercreator()->isNotEmpty() ? $site->twittercreator() : ' ',

```

---

<div class="post-metadata">

**Author:** ![John2202](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@John2202](https://forum.getkirby.com/u/John2202)\
**Post date:** [November 22, 2020, 6:29pm UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/7 "2020-11-22T18:29:04Z")

</div>

I have created the controllers for each page but I placed the snippet in the templates of each page, I think that’s the error. I have header and footer in the snippets folder, should I put the SEO snippet in it?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [November 22, 2020, 6:31pm UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/8 "2020-11-22T18:31:38Z")

</div>

The snippet should go where ever you have the HTML head tag. Putting it somewhere else wont stop it working and shouldnt throw an error, but meta tags wont be valid unless they are in the head. it will still out put them, but it wont be valid HTML if you put it somewhere else.

If you want to see a working example, its hooked up into my Kirby boilerplate, which is a slightly enhanced version of the Kirby Plain Kit… [https://github.com/HashandSalt/ForgeLiteKirby](https://github.com/HashandSalt/ForgeLiteKirby)

---

<div class="post-metadata">

**Author:** ![John2202](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@John2202](https://forum.getkirby.com/u/John2202)\
**Post date:** [November 23, 2020, 7:24am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/9 "2020-11-23T07:24:16Z")

</div>

> [@jimbobrjames](#):
>
> ```auto
> // Meta
> 'metatitle' => $site->title(),
> 'metadesc' => $page->seometa(),
> 'metakeywords' => $page->seotags(),
> 'metarobots' => 'index, follow, noodp',
> 'metaurl' => $site->url(),
> 'metaimage' => $page->shareimage()->toFile() ? $page->shareimage()->toFile()->crop(1280, 720)->url() : ' ',
> 
> // Facebook Meta
> 'metafbtype' => 'website',
> 'metafbsitename' => $site->title(),
> 'metafblocale' => 'en_GB',
> 
> // Twitter Meta
> 'metatwcard' => 'summary_large_image',
> 'metatwsite' => $site->socialtwitterurl()->isNotEmpty() ? $site->socialtwitterurl() : ' ',
> 'metatwcreator' => $site->twittercreator()->isNotEmpty() ? $site->twittercreator() : ' ',
> 
> ```

where should I place the above code?

---

<div class="post-metadata">

**Author:** ![John2202](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@John2202](https://forum.getkirby.com/u/John2202)\
**Post date:** [November 23, 2020, 7:27am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/10 "2020-11-23T07:27:59Z")

</div>

> [@jimbobrjames](#):
>
> ```auto
> <?php
> 
> return function ($page, $kirby, $site) {
> 
> // Meta
> $seo = $kirby->controller('seo' , compact('page', 'site', 'kirby'));
> 
> // Override Meta Title
> $metatitle = $page->seotitle().' | '.$site->title();
> 
> $data = compact('metatitle');
> 
> return a::merge($seo, $data);
> 
> };
> 
> ```

and should i overwrite the code in the controllers for this?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [November 23, 2020, 7:37am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/11 "2020-11-23T07:37:14Z")

</div>

Replace the controller for the page with the code above. For example, if you wanted to override the meta robots and the meta title, your entire contoller would look something like this:

```auto
<?php

return function ($page, $kirby, $site) {

  // Meta
  $seo = $kirby->controller('seo' , compact('page', 'site', 'kirby'));

  // Override Meta Title
  $metatitle = $page->seotitle().' | '.$site->title();

  // Override Robots
  $metarobots = 'noindex, nofollow, noodp';

  $data = compact('metatitle', 'metarobots');

  return a::merge($seo, $data);

};

```

---

<div class="post-metadata">

**Author:** ![John2202](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@John2202](https://forum.getkirby.com/u/John2202)\
**Post date:** [November 23, 2020, 7:50am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/12 "2020-11-23T07:50:42Z")

</div>

> [@jimbobrjames](#):
>
> ```auto
> // Meta
> 'metatitle' => $site->title(),
> 'metadesc' => $page->seometa(),
> 'metakeywords' => $page->seotags(),
> 'metarobots' => 'index, follow, noodp',
> 'metaurl' => $site->url(),
> 'metaimage' => $page->shareimage()->toFile() ? $page->shareimage()->toFile()->crop(1280, 720)->url() : ' ',
> 
> // Facebook Meta
> 'metafbtype' => 'website',
> 'metafbsitename' => $site->title(),
> 'metafblocale' => 'en_GB',
> 
> // Twitter Meta
> 'metatwcard' => 'summary_large_image',
> 'metatwsite' => $site->socialtwitterurl()->isNotEmpty() ? $site->socialtwitterurl() : ' ',
> 'metatwcreator' => $site->twittercreator()->isNotEmpty() ? $site->twittercreator() : ' ',
> 
> ```

should i ignore this?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [November 23, 2020, 7:53am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/13 "2020-11-23T07:53:31Z")

</div>

Yes, unless you want to override any of them. Those are the variable names to use. Otherwise, the defaults built into the plugin will work for you without configuration from you.

---

<div class="post-metadata">

**Author:** ![John2202](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@John2202](https://forum.getkirby.com/u/John2202)\
**Post date:** [November 23, 2020, 7:56am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/14 "2020-11-23T07:56:44Z")

</div>

Okay, but I still do not know where to make use of it in case of future project.

Thanks.

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [November 23, 2020, 8:07am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/15 "2020-11-23T08:07:17Z")

</div>

Im not sure I understand what you mean. Its the same process for any site.

1. Install the plugin
2. Create a controller to match each page template.
3. Add the included tab from the blueprint to your own blue prints.

This will give you fields in the panel to add the information for each page.

 ![Screenshot 2020-11-23 at 08.06.00](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/7/7e6722d66df5345ab94b0e428213bb874b09763f.png)

---

<div class="post-metadata">

**Author:** ![John2202](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@John2202](https://forum.getkirby.com/u/John2202)\
**Post date:** [November 23, 2020, 8:13am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/16 "2020-11-23T08:13:28Z")

</div>

I did all these but i added the blueprint to site.yml, is that the right place to put the blueprint?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [November 23, 2020, 8:19pm UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/17 "2020-11-23T20:19:19Z")

</div>

This shoud go on page blue prints, not the site blueprint.

---

<div class="post-metadata">

**Author:** ![John2202](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@John2202](https://forum.getkirby.com/u/John2202)\
**Post date:** [November 27, 2020, 9:41am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/18 "2020-11-27T09:41:24Z")

</div>

> [@jimbobrjames](#):
>
> ```auto
> <?php
> 
> return function ($page, $kirby, $site) {
> 
> // Meta
> $seo = $kirby->controller('seo' , compact('page', 'site', 'kirby'));
> 
> // Override Meta Title
> $metatitle = $page->seotitle().' | '.$site->title();
> 
> // Override Robots
> $metarobots = 'noindex, nofollow, noodp';
> 
> $data = compact('metatitle', 'metarobots');
> 
> return a::merge($seo, $data);
> 
> };
> 
> ```

It doesn’t override the title

---

<div class="post-metadata">

**Author:** ![Lamibexi](https://avatars.discourse-cdn.com/v4/letter/l/51bf81/32.png) [@Lamibexi](https://forum.getkirby.com/u/Lamibexi)\
**Post date:** [September 23, 2025, 8:13am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/19 "2025-09-23T08:13:51Z")

</div>

has anyone here tried adding dynamic open graph images based on page content using the kirby seo plugin? I’m wondrringhow others are handling image fallbacks when a page doesn’t have a featured image

---

<div class="post-metadata">

**Author:** ![Lamibexi](https://avatars.discourse-cdn.com/v4/letter/l/51bf81/32.png) [@Lamibexi](https://forum.getkirby.com/u/Lamibexi)\
**Post date:** [October 6, 2025, 11:11am UTC](https://forum.getkirby.com/t/how-to-setup-kirby3-seo-plugin-in-details/20107/20 "2025-10-06T11:11:56Z")

</div>

(post deleted by author)
