PHPackages                             infusionweb/laravel-robots-route - 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. infusionweb/laravel-robots-route

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

infusionweb/laravel-robots-route
================================

A route for serving a basic robots.txt in Laravel 5.1+, based on configuration settings.

0.1.0(10y ago)12.2kMITPHPPHP &gt;=5.5.9

Since Apr 13Pushed 10y agoCompare

[ Source](https://github.com/InfusionWeb/laravel-robots-route)[ Packagist](https://packagist.org/packages/infusionweb/laravel-robots-route)[ Docs](https://github.com/infusionweb/laravel-robots-route)[ RSS](/packages/infusionweb-laravel-robots-route/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Laravel 5 robots.txt Route
==========================

[](#laravel-5-robotstxt-route)

A route for serving a basic robots.txt in Laravel 5.1+, based on configuration settings.
----------------------------------------------------------------------------------------

[](#a-route-for-serving-a-basic-robotstxt-in-laravel-51-based-on-configuration-settings)

This is a fork of [ellisthedev/laravel-5-robots](https://github.com/ellisthedev/laravel-5-robots), which was a fork of [jayhealey/Robots](https://github.com/jayhealey/Robots), which was based on earlier work.

The purpose of this fork is to create a set-it-and-forget-it package that can be installed without much effort. It is therefore highly opinionated and not built for configuration.

When enabled, it allows access to all clients and serves up the sitemap.xml. Otherwise, it operates almost identically to Laravel's default configuration, denying access to all clients.

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

[](#installation)

### Step 1: Composer

[](#step-1-composer)

Via Composer command line:

```
$ composer require infusionweb/laravel-robots-route
```

Or add the package to your `composer.json`:

```
{
    "require": {
        "infusionweb/laravel-robots-route": "~0.1.0"
    }
}
```

### Step 2: Remove the existing robots.txt

[](#step-2-remove-the-existing-robotstxt)

Laravel ships with a default robots.txt which disallows all clients. It needs to be removed for the configured route to work.

```
$ rm public/robots.txt
```

### Step 3: Enable the route

[](#step-3-enable-the-route)

Add the service provider to your `config/app.php`:

```
'providers' => [
    //
    InfusionWeb\Laravel\Robots\RobotsServiceProvider::class,
];
```

Publish the package config file:

```
$ php artisan vendor:publish --provider="InfusionWeb\Laravel\Robots\RobotsServiceProvider"
```

You may now allow clients via robots.txt by editing the `config/robots.php` file, opening up the site to search engines:

```
return [
    'allow' => env('ROBOTS_ALLOW', true),
];
```

Or simply setting the the `ROBOTS_ALLOW` environment variable to true, via the Laravel `.env` file or hosting environment.

```
ROBOTS_ALLOW=true
```

Credits
-------

[](#credits)

- [Russell Keppner](https://github.com/rkeppner)
- [All Contributors](https://github.com/InfusionWeb/laravel-robots-route/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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

Unknown

Total

1

Last Release

3681d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fc05d57b76fdaaa9b75d0a251cf480b25901c5cc3ee1f56f1d73ef07e66edf3f?d=identicon)[rkeppner](/maintainers/rkeppner)

---

Top Contributors

[![ellisio](https://avatars.githubusercontent.com/u/127468?v=4)](https://github.com/ellisio "ellisio (12 commits)")[![rkeppner](https://avatars.githubusercontent.com/u/3485765?v=4)](https://github.com/rkeppner "rkeppner (4 commits)")

---

Tags

laravelrouterobots.txt

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/infusionweb-laravel-robots-route/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[verschuur/laravel-robotstxt

Set the robots.txt content dynamically based on the Laravel app environment.

43402.6k1](/packages/verschuur-laravel-robotstxt)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[amendozaaguiar/filament-route-statistics

Filament route statictics viewer

3225.0k1](/packages/amendozaaguiar-filament-route-statistics)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[proai/lumen-annotations

Route and event binding annotations for Laravel Lumen

1012.4k](/packages/proai-lumen-annotations)

PHPackages © 2026

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