pagehive

put_robots

Publish robots.txt on this site.

Draft contentChanges dataAll plans

What it does

Publish robots.txt on this site. A private, offline, unpublished, or unreviewed site still serves Disallow: / and ignores this file.

Plans

Works on every plan: Free, Basic, Pro and Ultra.

Parameters

NameTypeAbout
site_idrequiredstringThe id of the site. list_sites gives the ids of your sites.
sourcerequiredstringThe text of robots.txt.
messagestringA short note for the version history, like a commit message.
verbosebooleantrue lists every file and page of the draft. Otherwise the response lists only what this call changed, plus draft totals.

Example

Call put_robots with these arguments:

{
  "site_id": "01a1…",
  "source": "User-agent: *\nAllow: /\nSitemap: https://team-recipes.pagehive.space/sitemap.xml"
}

Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.

Related guides