{"id":13395595,"url":"https://github.com/php-middleware/block-robots","last_synced_at":"2025-12-28T09:09:20.033Z","repository":{"id":57039843,"uuid":"41818397","full_name":"php-middleware/block-robots","owner":"php-middleware","description":"Middleware to avoid search engine indexing with PSR-7 using robots.txt and X-Robots-Tag","archived":false,"fork":false,"pushed_at":"2021-04-29T20:08:16.000Z","size":14,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T18:15:19.328Z","etag":null,"topics":["google","middleware","psr-15","psr-7","robots-txt","seo"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-middleware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-02T18:13:41.000Z","updated_at":"2021-12-28T15:56:44.000Z","dependencies_parsed_at":"2022-08-23T23:30:35.405Z","dependency_job_id":null,"html_url":"https://github.com/php-middleware/block-robots","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-middleware%2Fblock-robots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-middleware%2Fblock-robots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-middleware%2Fblock-robots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-middleware%2Fblock-robots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-middleware","download_url":"https://codeload.github.com/php-middleware/block-robots/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243493044,"owners_count":20299589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google","middleware","psr-15","psr-7","robots-txt","seo"],"created_at":"2024-07-30T18:00:25.293Z","updated_at":"2025-12-28T09:09:14.955Z","avatar_url":"https://github.com/php-middleware.png","language":"PHP","readme":"# block-robots middleware [![Build Status](https://travis-ci.org/php-middleware/block-robots.svg?branch=master)](https://travis-ci.org/php-middleware/block-robots)\nPSR-15 middleware to avoid search engine indexing with PSR-7\n\nThis middleware provide framework-agnostic possibility to preventing your site from being indexed.\n\n## How it works?\n\n* Add `X-Robots-Tag` header with `noindex, nofollow` value.\n* Add `robots.txt` \"file\" with `User-Agent: * Disallow: /` body\n\n## Installation\n\n```bash\ncomposer require php-middleware/block-robots\n```\n\n```php\n$blockRobotsMiddleware = new PhpMiddleware\\BlockRobots\\BlockRobotsMiddleware();\n\n$app = new MiddlewareRunner();\n$app-\u003eadd($blockRobotsMiddleware);\n$app-\u003erun($request, $response);\n```\n\n## It's just works with any modern php framework!\n\nMiddleware tested on:\n* [Expressive](https://github.com/zendframework/zend-expressive)\n\nMiddleware should works with:\n* [Slim 3.x](https://github.com/slimphp/Slim)\n\nAnd any other modern framework [supported middlewares and PSR-7](https://mwop.net/blog/2015-01-08-on-http-middleware-and-psr-7.html).\n","funding_links":[],"categories":["Middleware"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-middleware%2Fblock-robots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-middleware%2Fblock-robots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-middleware%2Fblock-robots/lists"}