PHPackages                             fuelviews/laravel-robots-txt - 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. fuelviews/laravel-robots-txt

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

fuelviews/laravel-robots-txt
============================

Laravel robots txt package

v1.0.0(9mo ago)13.2k↑110%[2 PRs](https://github.com/fuelviews/laravel-robots-txt/pulls)MITPHPPHP ^8.3CI passing

Since Mar 5Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/fuelviews/laravel-robots-txt)[ Packagist](https://packagist.org/packages/fuelviews/laravel-robots-txt)[ Docs](https://github.com/fuelviews/laravel-robots-txt)[ RSS](/packages/fuelviews-laravel-robots-txt/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (13)Used By (0)

Laravel Robots.txt Package
==========================

[](#laravel-robotstxt-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e6cb61411fd34d38e3d86403c30d85c9904e8dd05987271f65c20d966a0aa197/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6675656c76696577732f6c61726176656c2d726f626f74732d7478742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fuelviews/laravel-robots-txt)[![GitHub Tests Action Status](https://camo.githubusercontent.com/948ffa58d8cde6e80f867d42773923893d21f3a139886f3a844d0df6648556c2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6675656c76696577732f6c61726176656c2d726f626f74732d7478742f72756e2d74657374732e796d6c3f6c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/fuelviews/laravel-robots-txt/actions/workflows/run-tests.yml)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/720ebe88038669ba194682e193fda0e34a2371b1441c3bc35c11e04382c4a63b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6675656c76696577732f6c61726176656c2d726f626f74732d7478742f7068702d63732d66697865722e796d6c3f6c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/fuelviews/laravel-robots-txt/actions/workflows/php-cs-fixer.yml)[![Total Downloads](https://camo.githubusercontent.com/fcc2fb72c7c167df44579aa08c8393db3e0fb1f6f4674dff4b9665d5f008df5a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6675656c76696577732f6c61726176656c2d726f626f74732d7478742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fuelviews/laravel-robots-txt)[![PHP Version](https://camo.githubusercontent.com/33430a1c9affe51d23840404e5b74e01208118f8e2e48b63a9413b89296982c7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e332d626c75652e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![Laravel Version](https://camo.githubusercontent.com/9a53bef6bfbb6cb990aa06777c8b0a19b5ef9f43dd3c3747bbe19bc39630167b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d2535453130253743253545313125374325354531322d7265642e7376673f7374796c653d666c61742d737175617265)](https://laravel.com)

Laravel Robots.txt is a robust and easy-to-use solution designed to automatically generate and serve dynamic robots.txt files for your Laravel application. The package provides intelligent caching, environment-based rules, and seamless integration with your application's routing system.

Requirements
------------

[](#requirements)

- PHP ^8.3
- Laravel ^10.0 || ^11.0 || ^12.0

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

[](#installation)

Install the package via Composer:

```
composer require fuelviews/laravel-robots-txt
```

Publish the configuration file:

```
php artisan vendor:publish --tag="robots-txt-config"
```

Basic Usage
-----------

[](#basic-usage)

### Automatic Route Registration

[](#automatic-route-registration)

The package automatically registers a route at `/robots.txt` that serves your dynamic robots.txt file:

```
https://yoursite.com/robots.txt

```

### Configuration

[](#configuration)

Configure your robots.txt rules in `config/robots-txt.php`:

```
