A redirect sends a visitor who requests one path on a site to another path or URL. Sites use redirects to keep old links working after a page is renamed or removed, to consolidate duplicate URLs, and to point a whole section of a site somewhere else.
With the SEO Redirects API, you can:
A redirect returns a 301 permanent redirect to the visitor, so search engines treat the target as the page's new home.
A redirect takes effect on the live site as soon as it's created, with no site publish, and stops taking effect as soon as it's deleted.
A redirect also takes precedence over a page that exists at the same path. Creating a redirect from a path that still serves a page makes that page unreachable until the redirect is deleted.
A redirect matches either one path or a whole branch of the site, depending on options.groupRedirect:
options.groupRedirect is false or omitted, and only the from path matches.options.groupRedirect is true, and every path under from matches. The rest of the URL carries over to the target, so a group redirect from /forum/questions/ to /forum/faqs/ sends /forum/questions/my-post to /forum/faqs/my-post.An exact redirect and a group redirect that share a from path are two different redirects.
There's no method to update a redirect. To change one, retrieve it, delete it, then create the replacement:
Carry the whole redirect across, not only the fields you're changing. Create Redirect fills a field you omit with its default rather than with the redirect's previous value, so an omitted options turns a group redirect into an exact one, and an omitted language turns a language-scoped redirect into one that applies to every language. Keep id to preserve the redirect's identity, or omit it to get a new one.
Two situations delete a redirect that's already on the site, without a separate call and without a confirmation step. The deleted redirect can't be recovered, so retrieve it first if you might need to restore it.
REDIRECT_LOOP when the loop is with an earlier redirect in the same request.options.forceReplace. Setting it to true deletes the redirect that already starts from the same from path, instead of failing with FROM_URL_EXISTS.Bulk Create Redirects and Bulk Delete Redirects report each redirect separately, inside a successful response:
results[].itemMetadata, matched to your request by originalIndex. A failed item carries an error with a code such as FROM_URL_EXISTS or REDIRECT_NOT_FOUND.bulkActionMetadata. Its undetailedFailures counts redirects whose outcome is unknown: they carry no error, and they may or may not have been written, so call List Redirects to check them.Bulk Create Redirects isn't atomic. If a redirect is deleted to resolve a loop or a conflict and the write that follows fails, the deleted redirect is gone and nothing takes its place. Repeating the same request recreates it.
It's important to note the following points before starting to code:
from path can't be the site root.from or to path on a redirect scoped to a language is stored without the language prefix, so a fr redirect created from /fr/about is returned as /about.id or a createdDate, and Bulk Create Redirects reports a success with no id.from path.from path and everything under it, carrying the rest of the URL over to the target.language applies to every language.Last updated: 20 August 2026