PHPackages                             arcanedev/robots - 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. arcanedev/robots

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

arcanedev/robots
================

Robots.txt generator

2.0.0(10y ago)76141MITPHPPHP &gt;=5.5.9

Since May 14Pushed 10y ago2 watchersCompare

[ Source](https://github.com/ARCANEDEV/Robots)[ Packagist](https://packagist.org/packages/arcanedev/robots)[ Docs](https://github.com/ARCANEDEV/Robots)[ RSS](/packages/arcanedev-robots/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (1)

Robots.txt Generator [![Packagist License](https://camo.githubusercontent.com/41aebf5d5d7007de5ff1eeb3afdbd280bedc40ae7a69863fe69c335c2004928e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f617263616e656465762f726f626f74732e7376673f7374796c653d666c61742d737175617265)](LICENSE.md) [![For PHP](https://camo.githubusercontent.com/cdc03b34bee04f3c6afe99b47173b09d65b92d88b04aded32b3b8cc5e12ecee9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d4672616d65776f726b25323061676e6f737469632d3446354239332e7376673f7374796c653d666c61742d737175617265)](https://github.com/ARCANEDEV/Robots)
===========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#robotstxt-generator--)

[![Travis Status](https://camo.githubusercontent.com/dbb0bbd75e08fb5fe411113974d0bf4e3ad3b9b74363feb250855fa0a84dd97f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f415243414e454445562f526f626f74732e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/ARCANEDEV/Robots)[![HHVM Status](https://camo.githubusercontent.com/6c7e8c7a712e0d636168467c7cf917d20260c47953b2504993db9e75c5593d7b/68747470733a2f2f696d672e736869656c64732e696f2f6868766d2f617263616e656465762f726f626f74732e7376673f7374796c653d666c61742d737175617265)](http://hhvm.h4cc.de/package/arcanedev/robots)[![Coverage Status](https://camo.githubusercontent.com/e9519b359a2aa7b5a8a3aef3285d43af44591e438943bac502310ce8fc7aa92f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f415243414e454445562f526f626f74732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ARCANEDEV/Robots/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b85a93a6172c42e4d19a8ac20c085ff6dee3c6da72b3566ab1ceee60fb626206/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f415243414e454445562f526f626f74732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ARCANEDEV/Robots/?branch=master)[![SensioLabs Insight](https://camo.githubusercontent.com/cbe8c44d305fb97defad61fd13e1f5d6c9c36ff3a8f7e1d634bffc7b1124e4ac/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f65306435643436372d333163382d346266652d383466312d6534623062666532633439372e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/e0d5d467-31c8-4bfe-84f1-e4b0bfe2c497)[![Github Issues](https://camo.githubusercontent.com/d6a8c1251666aa73a9b92f04e44d11660fbef619be13f08f171124d2acfd7631/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f415243414e454445562f526f626f74732e7376673f7374796c653d666c61742d737175617265)](https://github.com/ARCANEDEV/Robots/issues)

[![Packagist](https://camo.githubusercontent.com/185be2d77ebb9c44ab6b053a1ac5004291a47f5bfcd4ed27c6b4a56cfd31f76b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b6167652d617263616e656465762f726f626f74732d626c75652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arcanedev/robots)[![Packagist Release](https://camo.githubusercontent.com/a424334f7e48cd0561e05e94afb7f9fbdbe0862a9892e183e40f21886acd2876/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617263616e656465762f726f626f74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arcanedev/robots)[![Packagist Downloads](https://camo.githubusercontent.com/8c86c18bc8ca535e5978c0e44bbdb24b30b2687d074cd7e609b4648e85952172/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617263616e656465762f726f626f74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arcanedev/robots)

*By [ARCANEDEV©](http://www.arcanedev.net/)*

### Features

[](#features)

- Framework agnostic package.
- Well documented &amp; IDE Friendly.
- Well tested with maximum code quality.
- Laravel 4.2 supported.
- Laravel 5 supported.
- Made with ❤️ &amp; ☕.

### Requirements

[](#requirements)

```
- PHP >= 5.5.9

```

INSTALLATION
============

[](#installation)

Composer
--------

[](#composer)

You can install this package via [Composer](http://getcomposer.org/). Add this to your `composer.json` :

```
{
    "require": {
        "arcanedev/robots": "~2.0"
    }
}
```

Then install it via `composer install` or `composer update`.

Laravel
-------

[](#laravel)

### Setup

[](#setup)

Once the package is installed, you can register the service provider in `config/app.php` in the `providers` array:

```
'providers' => [
    ...
    Arcanedev\Robots\RobotsServiceProvider::class,
],
```

And the facade in the `aliases` array:

```
'aliases' => [
    ...
    'Robots' => Arcanedev\Robots\Facades\Robots::class,
],
```

USAGE
=====

[](#usage)

### Laravel

[](#laravel-1)

The quickest way to use Robots is to just setup a callback-style route for robots.txt in your `app/routes.php` file.

```
Route::get('robots.txt', function() {

    // If on the live server, serve a nice, welcoming robots.txt.
    if (App::environment() == 'production') {
        Robots::addUserAgent('*');
        Robots::addSitemap('sitemap.xml');
    }
    else {
        // If you're on any other server, tell everyone to go away.
        Robots::addDisallow('*');
    }

    return Response::make(Robots::generate(), 200, ['Content-Type' => 'text/plain']);
});
```

### Hard Coded

[](#hard-coded)

Add a rule in your `.htaccess` for `robots.txt` that points to a new script (or something else) that generate the robots file.

The code would look something like:

```
require_once __DIR__ . '/../vendor/autoload.php';

use Arcanedev\Robots\Robots;

$robots = new Robots;

$robots->addUserAgent('Google');
$robots->addDisallow(['/admin/', '/login/', '/secret/']);
$robots->addSpacer();
$robots->addSitemap('sitemap.xml');

header('HTTP/1.1 200 OK');
echo $robots->generate();
```

TODOS
-----

[](#todos)

- Documentation

DONE
----

[](#done)

- Framework agnostic package.
- Examples
- Laravel v4.2 Support.
- Laravel v5.0 Support.
- Laravel v5.1 Support.

Contribution
------------

[](#contribution)

Any ideas are welcome. Feel free to submit any issues or pull requests, please check the [contribution guidelines](CONTRIBUTING.md).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~81 days

Total

3

Last Release

3860d ago

Major Versions

1.0.1 → 2.0.02015-10-23

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

2.0.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9376707?v=4)[ARCANEDEV](/maintainers/arcanedev)[@ARCANEDEV](https://github.com/ARCANEDEV)

---

Top Contributors

[![arcanedev-maroc](https://avatars.githubusercontent.com/u/3282340?v=4)](https://github.com/arcanedev-maroc "arcanedev-maroc (34 commits)")

---

Tags

laravelarcanedevrobots

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arcanedev-robots/health.svg)

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

###  Alternatives

[arcanedev/support

ARCANEDEV Support Helpers

1888.2M78](/packages/arcanedev-support)[arcanedev/seo-helper

SEO Helper is a framework agnostic package that provides tools &amp; helpers for SEO (Laravel supported).

332467.0k4](/packages/arcanedev-seo-helper)[arcanedev/gravatar

A library providing easy gravatar integration/generation (Laravel supported).

1986.8k](/packages/arcanedev-gravatar)[calotype/seo

A package containing SEO helpers.

722.6k](/packages/calotype-seo)

PHPackages © 2026

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