owenmelbz/laravel-robots-txt
Laravel 5 & 6 robots.txt helper with meta blade directive
An automatically generated robots.txt which automatically discourages indexing of folders, with additional meta tag blade directives for in page exclusions.
Usage
-
Install via composer
composer require owenmelbz/laravel-robots-txt -
Register the service provider - typically done inside the
app.phpproviders array e.gOwenMelbz\RobotsTxt\RobotsTxtServiceProvider::class -
Add
BLOCK_ROBOTS=trueto your application environment config e.g.env -
Within your
<head>area you can include the blade directive@robotsMetato pull through anoindex, nofollowmeta tag.
Configuration
If you publish the package via php artisan vendor:publish --provider="OwenMelbz\RobotsTxt\RobotsTxtServiceProvider" you can use a custom robots.txt template file to include extra rules.
Related Packages
Set the robots.txt content dynamically based on the Laravel app environment.
Generate sitemap.xml and robots.txt files in Laravel or any PHP Application with...
Generate sitemap.xml and robots.txt files in Laravel 4.2 with support for multi-...
A route for serving a basic robots.txt in Laravel 5.1+, based on configuration s...
Set the robots.txt content dynamically based on the Laravel app environment.
Version History
| Version | Released | Laravel | License |
|---|---|---|---|
| 0.0.4 | MIT | ||
| 0.0.3 | 5.* | MIT | |
| 0.0.2 | 5.* | MIT | |
| 0.0.1 | 5.* | MIT |