PHPackages                             miisieq/robots-txt-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. miisieq/robots-txt-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

miisieq/robots-txt-bundle
=========================

Robots.txt generator for Symfony 2, 3 &amp; 4

2.0.1(7y ago)32.5k1MITPHPPHP ^7.1

Since Oct 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/miisieq/RobotsTxtBundle)[ Packagist](https://packagist.org/packages/miisieq/robots-txt-bundle)[ RSS](/packages/miisieq-robots-txt-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (5)Versions (6)Used By (0)

MiisieqRobotsTxtBundle
======================

[](#miisieqrobotstxtbundle)

SensioLabsInsightStyle-CITravis CICoverageDownloadsRelease[![SensioLabsInsight](https://camo.githubusercontent.com/f139c1672cbc49a530f79d13333f473c19f4ae3c055a1f8b92f72ffeef3a853e/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f31616564303236372d613465322d343332322d383863662d3764636263326134643862642f6d696e692e706e67)](https://insight.sensiolabs.com/projects/1aed0267-a4e2-4322-88cf-7dcbc2a4d8bd)[![StyleCI](https://camo.githubusercontent.com/e9199cb3e0e913b8e7fd717928ecde28447af5e016e375cd44abd0f47ba60bfc/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130353937333231392f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/105973219)[![Travis CI](https://camo.githubusercontent.com/0756ceb84fcf7cf6bc88a745f8669cfdf27b7015666c4fe7ac9f4c2962a1df5a/68747470733a2f2f7472617669732d63692e6f72672f6d6969736965712f526f626f747354787442756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/miisieq/RobotsTxtBundle)[![codecov](https://camo.githubusercontent.com/ff2d9b8f56a1b3a88010e626ffa12fdddf2d723883b00531395119c88666fbc5/68747470733a2f2f636f6465636f762e696f2f67682f6d6969736965712f526f626f747354787442756e646c652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/miisieq/RobotsTxtBundle)[![Total Downloads](https://camo.githubusercontent.com/4ad96b21ef7fcd5facf1fc7e7c436248f21517c7d105ef4864d5526866d2df72/68747470733a2f2f706f7365722e707567782e6f72672f6d6969736965712f726f626f74732d7478742d62756e646c652f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/miisieq/robots-txt-bundle)[![Latest Stable Version](https://camo.githubusercontent.com/d36620da5c587638aec65f72370cc3ab6807310eebe283b5ac42fad3577b8a22/68747470733a2f2f706f7365722e707567782e6f72672f6d6969736965712f726f626f74732d7478742d62756e646c652f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/miisieq/robots-txt-bundle)The problem
-----------

[](#the-problem)

It's pretty common workflow that we work on our projects in `local` environment, then deploy code to `preproduction` or `staging` server for out client to approve the work, then finally push to `production` environment.

While we absolutely want crawlers to index our `production` environment, we don't want to see our test servers in search results.

How it works?
-------------

[](#how-it-works)

Depending on the Symfony environment, application will return `robots.txt` file with rule that allows to index whole content only we are in `prod` environment. In case of another environment, the application will block whole site from indexing.

Installation
------------

[](#installation)

### Step 1: Install the bundle

[](#step-1-install-the-bundle)

First, open a command console, enter your project directory and execute the following command to download the latest version of this bundle:

```
composer require miisieq/robots-txt-bundle

```

### Step 2: Register the bundle in your kernel

[](#step-2-register-the-bundle-in-your-kernel)

Then add the bundle to your kernel:

```
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ...

            new Miisieq\RobotsTxtBundle\MiisieqRobotsTxtBundle(),
        ];

        // ...
    }
}
```

### Step 3: Configure the bundle

[](#step-3-configure-the-bundle)

Add the following to your config file:

```
# app/config/config.yml

miisieq_robots_txt: ~
```

You can easily add links to your site maps:

```
# app/config/config.yml

miisieq_robots_txt:
    host: http://example.com
    production_environment: prod
    sitemaps:
        - "/sitemap.xml"
        - "/catalog/sitemap.xml"
```

### Step 4: Register the routes

[](#step-4-register-the-routes)

To allow to get your `robots.txt` file, register the following route:

```
# app/config/routing.yml
miisieq_robots_txt:
    resource: "@MiisieqRobotsTxtBundle/Resources/config/routes.yaml"
    prefix:   /
```

### Step 5: Remove static `robots.txt` file (if exists)

[](#step-5-remove-static-robotstxt-file-if-exists)

```
rm web/robots.txt
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity62

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~94 days

Total

5

Last Release

2764d ago

Major Versions

v1.1.0 → v2.0.02018-10-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/571c3cd1d712024fbfac8eeac6c086b6d3490aa45bce3f112e8cb3e6d1c5329e?d=identicon)[miisieq](/maintainers/miisieq)

---

Tags

symfonybundlerobotsrobots.txt

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/miisieq-robots-txt-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/miisieq-robots-txt-bundle/health.svg)](https://phpackages.com/packages/miisieq-robots-txt-bundle)
```

###  Alternatives

[pentatrion/vite-bundle

Vite integration for your Symfony app

2725.3M13](/packages/pentatrion-vite-bundle)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)[flagception/flagception-bundle

Feature toggle bundle on steroids.

283.8M](/packages/flagception-flagception-bundle)[sineflow/clamav

ClamAV PHP Client for Symfony

10168.5k](/packages/sineflow-clamav)[bornfreee/tactician-domain-events-bundle

Bundle to integrate Tactician Domain Events library with Symfony project

10138.6k](/packages/bornfreee-tactician-domain-events-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
