https://github.com/webvpf/wn-robots-plugin
Plugin for Winter CMS. Adds robots.txt for your site.
https://github.com/webvpf/wn-robots-plugin
wintercms wintercms-plugin
Last synced: about 1 year ago
JSON representation
Plugin for Winter CMS. Adds robots.txt for your site.
- Host: GitHub
- URL: https://github.com/webvpf/wn-robots-plugin
- Owner: WebVPF
- License: mit
- Created: 2022-07-06T23:30:52.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-08T07:48:27.000Z (about 1 year ago)
- Last Synced: 2025-03-28T10:50:31.222Z (about 1 year ago)
- Topics: wintercms, wintercms-plugin
- Language: PHP
- Homepage: https://packagist.org/packages/webvpf/wn-robots-plugin
- Size: 11.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Robots plugin
This plugin adds robots.txt file for your Winter CMS site.
---
A `robots.txt` file is used to manage crawler traffic to your site. It tells search engine crawlers which URLs the crawler can access on your site. This is used mainly to avoid overloading your site with requests.
## Getting started
Use composer to install the plugin:
```bash
composer require webvpf/wn-robots-plugin
```
## Editing robots.txt
In the backend of your application, go to settings and select `Robots.txt`. When filling out the rules, you can use Twig.
An example of filling robots.txt:
```twig
User-agent: *
Allow: /
Sitemap: {{ 'sitemap.xml'|app }}
```
or
```twig
Sitemap: {{ url('sitemap.xml') }}
```
As a result, robots.txt will look like this:
```yaml
User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xml
```
## Instructions for robots.txt
For detailed instructions on filling out the robots.txt file, see [developers.google.com](https://developers.google.com/search/docs/crawling-indexing/robots/create-robots-txt)