Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Robots Txt Bundle Laravel Package

evheniy/robots-txt-bundle

Symfony2 bundle that generates robots.txt from config.yml entries, including sitemap lines, and dumps it via app/console robots.txt:dump. Supports separate per-environment rules so dev can Disallow: / while prod lists a sitemap.

View on GitHub
Deep Wiki
Context7

RobotsTxtBundle

This bundle provides robots.txt generator for Symfony2

knpbundles.com

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status Coverage Status Scrutinizer Code Quality Build Status

Installation

$ composer require evheniy/robots-txt-bundle "1.*"

Or add to composer.json

"evheniy/robots-txt-bundle": "1.*"

AppKernel:

public function registerBundles()
    {
        $bundles = array(
            ...
            new Evheniy\RobotsTxtBundle\RobotsTxtBundle(),
            ...
        );
        ...
...

config.yml:

robots_txt:
  - 'User-agent: *'

Or with sitemap:

robots_txt:
  - 'User-agent: *'
  - 'Sitemap: http://test.com/sitemap.xml'

The last step

app/console robots.txt:dump

Using different environments

The main idea is to use robots.txt for different environments, for example: for dev hiding project from indexing robots like Google

config_prod.yml:

robots_txt:
  - 'User-agent: *'
  - 'Sitemap: http://test.com/sitemap.xml'

config_dev.yml:

robots_txt:
  - 'User-agent: *'
  - 'Disallow: /'

And run it for prod:

app/console robots.txt:dump --env=prod

And run it for dev:

app/console robots.txt:dump --env=dev

Or just

app/console robots.txt:dump

License

This bundle is under the MIT license.

Документация на русском языке

Demo

Build a robots.txt

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels