PHPackages                             mtz-jaime/robots-sitemap - 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. mtz-jaime/robots-sitemap

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

mtz-jaime/robots-sitemap
========================

Robots and sitemap generator package for laravel

06PHP

Since Nov 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mtz-jaime/robots-sitemap)[ Packagist](https://packagist.org/packages/mtz-jaime/robots-sitemap)[ RSS](/packages/mtz-jaime-robots-sitemap/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Robots and Sitemap generator package
====================================

[](#robots-and-sitemap-generator-package)

This package will help you to create a robots.txt file and a sitemap with all the get routes of your application on the fly.

Getting Started
---------------

[](#getting-started)

### Installation

[](#installation)

Install via Composer.

```
composer require mtz-jaime/robots-sitemap

```

If you are using Laravel 5.5 this package already includes the auto discovery package. If for some reason you decided to remove this functionality on your application, add the service provider into your application config.

Do this by adding the following line to the 'providers' section of the application config (usually config/app.php):

```
MtzJaime\RobotsSitemap\RobotsSitemapServiceProvider::class,

```

Publish the config file in order to have control to decide what to block in your robots or sitemap

```
php artisan vendor:publish --provider="MtzJaime\RobotsSitemap\RobotsSitemapServiceProvider" --tag="config"

```

Code Usage
----------

[](#code-usage)

To enable the package features you need to add this new env variable `BLOCK_SITE=false`

Configure the config file as better fit under your requirements.

```
'disallowURL' =>
[
    /mySecretPost
    /mySecretFolder/
],

'userAgent' =>
[
    'AgentName' => ['/', '/mySecretFolder/', '/mySecretPost']
],

'excludeSiteMap' =>
[
    // Do not include the initial '/'
    mySecretFolder/mySecretPost
    mySecretPost
],

```

Before trying to access the robots.txt be sure that you already delete the default robots.txt file that Laravel provide in public/robots.txt

If you already deleted it and you get an 404 error, remove the following line from your nginx file or similar in apache

```
location = /robots.txt  { access_log off; log_not_found off; }

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/70a01f58ef6280a9ec9d2c55ef9236f0a20b51986df58c6fd6733fe3a182a360?d=identicon)[mtz-jaime](/maintainers/mtz-jaime)

---

Top Contributors

[![mtz-jaime](https://avatars.githubusercontent.com/u/16688100?v=4)](https://github.com/mtz-jaime "mtz-jaime (1 commits)")

### Embed Badge

![Health badge](/badges/mtz-jaime-robots-sitemap/health.svg)

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

PHPackages © 2026

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