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
| Ability | rank-math/update-general-settings |
| Toolset | Rank Math — toolset/rank-math |
| Group | Rank Math › Settings |
| Requires | Rank Math SEO, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI 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
| Name | Type | Required | What it is |
|---|---|---|---|
section | string | Yes | Which general section to write. |
settings | object | Yes | A map of field ID to value, validated against the section’s specification. |
What comes back
| Name | Type | What it is |
|---|---|---|
updated | array | The fields that changed. |
settings | object | The section after the write. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present 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 Rank Math Settings — discover the field IDs first
- Update Rank Math robots.txt — the separate robots panel
- Get Rank Math Rendered Head — verify the effect
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category