Manage your site's robots.txt from the Contensio admin. The file is served dynamically - no server configuration or file system access required.
Features:
- Edit robots.txt content in a code-editor–style textarea
- Reset to a sensible default (allow all, include Sitemap URL) at any time
- Served at
/robots.txtwithContent-Type: text/plain - Settings hub card in Admin > Settings
- Stored in the core
settingstable - survives deployments and zero-downtime updates
- Contensio 2.0 or later
composer require contensio/plugin-robots-txtCopy the plugin directory and register the service provider via the admin plugin manager.
No migrations required.
Go to Admin > Settings > Robots.txt Editor.
Write or paste your robots.txt content directly in the textarea. Each directive must be on its own line.
When no custom content has been saved, the plugin serves:
User-agent: *
Allow: /
Sitemap: https://your-site.com/sitemap.xml
The Sitemap URL is generated from your app's APP_URL environment variable.
The plugin registers a public GET /robots.txt route at the top of the route stack (before middleware groups). This route reads the stored content from the settings table and returns it as text/plain.
If the settings table is unreachable (e.g., during a migration), the default content is served instead.
| Hook | Description |
|---|---|
contensio/admin/settings-cards |
Settings hub card linking to the editor |
| Column | Value |
|---|---|
module |
plugin_robots_txt |
setting_key |
content |
value |
Raw robots.txt string |