{"id":19810298,"url":"https://github.com/fourlabsldn/robotsbundle","last_synced_at":"2025-07-24T11:42:23.977Z","repository":{"id":62506759,"uuid":"41499297","full_name":"fourlabsldn/RobotsBundle","owner":"fourlabsldn","description":"Symfony bundle to control X-Robots-Tag HTTP header via annotations","archived":false,"fork":false,"pushed_at":"2015-09-01T10:20:48.000Z","size":144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-03T08:54:15.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fourlabsldn.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-08-27T16:46:55.000Z","updated_at":"2018-10-16T17:20:16.000Z","dependencies_parsed_at":"2022-11-02T10:01:52.318Z","dependency_job_id":null,"html_url":"https://github.com/fourlabsldn/RobotsBundle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fourlabsldn/RobotsBundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fourlabsldn%2FRobotsBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fourlabsldn%2FRobotsBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fourlabsldn%2FRobotsBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fourlabsldn%2FRobotsBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fourlabsldn","download_url":"https://codeload.github.com/fourlabsldn/RobotsBundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fourlabsldn%2FRobotsBundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266836309,"owners_count":23992587,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T09:20:28.694Z","updated_at":"2025-07-24T11:42:23.930Z","avatar_url":"https://github.com/fourlabsldn.png","language":"PHP","readme":"# Robots Bundle\n\n**Symfony2 bundle to control `X-Robots-Tag` HTTP header via annotations.**\n\n[![Total Downloads](https://poser.pugx.org/fourlabs/robots-bundle/downloads)](https://packagist.org/packages/fourlabs/robots-bundle)\n[![License](https://poser.pugx.org/fourlabs/robots-bundle/license)](https://packagist.org/packages/fourlabs/robots-bundle)\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/25fe368d-13ac-4e1b-8de0-82575b2b7d3a/mini.png)](https://insight.sensiolabs.com/projects/25fe368d-13ac-4e1b-8de0-82575b2b7d3a)\n\n## Installation\n### Download the Bundle\nOpen a command console, enter your project directory and execute the following command to download the latest version of this bundle:\n\n``` bash\n$ composer require fourlabs/robots-bundle dev-master\n```\n\nThis command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.\n\n### Enable the Bundle\n\nThen, enable the bundle by adding the following line in the *app/AppKernel.php* file of your project:\n\n``` php\n\u003c?php\n// app/AppKernel.php\n\npublic function registerBundles()\n{\n    $bundles = array(\n        // ...\n        new FourLabs\\RobotsBundle\\FourLabsRobotsBundle(),\n    );\n}\n```\n\n## Usage\n\nFor more details see: https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#using-the-x-robots-tag-http-header\n\nExamples:\n\n``` php\nuse FourLabs\\RobotsBundle\\Configuration\\Robots;\n\n/**\n * @Robots(directive=\"index\")\n */\npublic function showAction()\n{\n}\n```\n\n``` php\nuse FourLabs\\RobotsBundle\\Configuration\\Robots;\n\n/**\n * @Robots(directive=\"nofollow\", userAgent=\"googlebot\")\n * @Robots(directive=\"noindex, nofollow\" userAgent=\"otherbot\")\n */\npublic function showAction()\n{\n}\n```\n\n``` php\nuse FourLabs\\RobotsBundle\\Configuration\\Robots;\n\n/**\n * @Robots(directive=\"noarchive\")\n * @Robots(directive=\"unavailable_after\" value=\"25 Jun 2010 15:00:00 PST\")\n */\npublic function showAction()\n{\n}\n```\n\n### Configuration\n\nSet `block_all` to true to always set the `X-Robots-Tag` header to `none`. This will block all indexing and serving. Default: false\n\nThis is helpful to set an **environment specific robots header** so as to prevent search engines from indexing dev and test environments. Simple place the following configuration in your config_dev.yml and/or config_test.yml.\n\n``` yaml\nfour_labs_robots:\n    block_all: true\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffourlabsldn%2Frobotsbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffourlabsldn%2Frobotsbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffourlabsldn%2Frobotsbundle/lists"}