Robots.txt bot directives
By default, Kirby SEO will dynamically generate a robots.txt
file and add the robots
meta tag to any page.
If a page is set to noindex
, canonical tags and similar will not be added to the page as well.
You can disable all Robots handling, by setting tobimori.seo.robots.active
to false
in your config.php.
Panel
Next to the page status button, there is an "Indexing Allowed/Disallowed" button that shows the current robots status of the page.
You can hide this by setting tobimori.seo.robots.indicator
to false
in your config.php
.
By default, there is a robots section in the panel. This allows overriding the site-wide robots rules from config.php
on a per-page basis. The robots fields follow the same cascade logic as other metadata fields.
You can remove this section by setting tobimori.seo.robots.pageSettings
to false
in your config.php
.
Site-wide Defaults (Options cascade)
By default, the page status determines if indexing is allowed. Drafts and unlisted pages are disallowed from indexing. Indexing is also disallowed if debug mode is enabled. These defaults can be overridden in the panel.
You can disable following the page status by setting tobimori.seo.robots.followPageStatus
to false
in your config.php.
The default indexing behavior for published pages can be customized by setting tobimori.seo.robots.index
to a boolean or callable that returns a boolean.
Options
tobimori.seo.robots. | Default | Accepts | Description |
---|---|---|---|
tobimori.seo.robots. active |
Default
true |
Accepts
boolean |
Enable/disable the entire robots module |
tobimori.seo.robots. followPageStatus |
Default
true |
Accepts
boolean |
Disable default behavior of blocking drafts/unlisted pages |
tobimori.seo.robots. pageSettings |
Default
true |
Accepts
boolean |
Show/hide Robots fields in the panel blueprint tab |
tobimori.seo.robots. indicator |
Default
true |
Accepts
boolean |
Show/hide indexing indicator next to page status |
tobimori.seo.robots. index |
Default
fn () => !option('debug') |
Accepts
boolean|callback |
Default indexing setting for published pages |
tobimori.seo.robots. sitemap |
Default
null |
Accepts
string|callback |
Sitemap URL to include in robots.txt, filled automatically if sitemap module is enabled |
tobimori.seo.robots. content |
Default
[] |
Accepts
array |
Custom robots.txt rules |
tobimori.seo.robots. types |
Default
internal |
Accepts
array |
Valid robot directive types - do not modify |
Options allow you to fine tune the behaviour of the plugin. You can set them in your config.php
file:
// site/config/config.php
return [
'tobimori.seo.robots' => [
'active' => true,
'content' => [
'*' => [
'Allow' => ['/'],
'Disallow' => ['/kirby', '/panel', '/content']
]
]
],
];
Support Kirby SEO development:
Get a Stay Awesome License
Kirby SEO is available completely free of charge.
If you’re using it to deliver a commercial project, please consider supporting further development & maintenance financially.