Sitecore Community GraphQL Cookbook

Get Robots.txt

GraphQL query to retrieve the robots.txt's content. This is being used the JSS SDK when rendering the robots.txt output
Source: JSS SDK
    Delivery APIJSS SDK

JSON Variables


Query


JSON Response

1{
2  "data": {
3    "site": {
4      "siteInfo": {
5        "robots": "User-agent: *Disallow: /Sitemap: https://....o/sitemap.xml"
6      }
7    }
8  }
9}