30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Update Rank Math General Settings

rank-math/update-general-settings writes Rank Math general settings: link behaviour, breadcrumbs, search-engine verification codes, image SEO alt and title automation, 404-monitor configuration, and redirection behaviour.

Values are validated against the section’s field specification and written through Rank Math’s own sanitizer.

At a glance

Abilityrank-math/update-general-settings
ToolsetRank Math — toolset/rank-math
GroupRank Math › Settings
RequiresRank Math SEO, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI Abilities Manager 0.0.34 and later

Explicit field types, and why multi-line values need them

Rank Math’s sanitizer behaves differently depending on the declared type of a field. Pass a multi-line value without telling the sanitizer it is multi-line and the line breaks are stripped — which turns a list of verification codes or a block of custom text into one unusable line.

So the write declares types explicitly rather than letting them be inferred. That is the difference between a settings write that round-trips and one that quietly mangles half its input.

Submitting a field that does not belong to the panel rejects the whole write, so rank-math/get-settings comes first: it lists the field IDs the panel accepts, with their types, allowed values and bounds.

Two neighbours are deliberately elsewhere: rank-math/update-robots-txt for robots.txt, which has its own refusal conditions, and rank-math/update-instant-indexing-settings for IndexNow, which holds an API key.

The image SEO automation is worth a note of its own: it generates alt and title attributes from filenames and post titles. That is better than nothing and worse than real alt text, and it is easy to enable and then forget that the site’s accessibility now rests on generated filenames.

Input

NameTypeRequiredWhat it is
sectionstringYesWhich general section to write.
settingsobjectYesA map of field ID to value, validated against the section’s specification.

What comes back

NameTypeWhat it is
updatedarrayThe fields that changed.
settingsobjectThe section after the write.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Turn on the 404 monitor.

It resolves to one call:

{
  "ability": "rank-math/update-general-settings",
  "parameters": {
    "section": "404-monitor",
    "settings": { "404_monitor_mode": "advanced" }
  }
}

Worth knowing

  • Multi-line values survive because the field types are declared explicitly.
  • A field from another panel rejects the whole write.
  • robots.txt and Instant Indexing have their own abilities.
  • Generated image alt text is not a substitute for real alt text.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading