About the SEO User Config API

The SEO User Config API lets you read and manage site-level SEO configuration settings that control how a site's pages are indexed by search engines and how non-existent page requests are resolved.

With the SEO User Config API, you can:

  • Retrieve the current SEO configuration for a site.
  • Enable or disable URL hierarchy flattening to control whether page URLs reflect their parent-child structure.
  • Configure how requests to non-existent pages are handled, returning an SEO-friendly 404 or resolving via partial route matching.

Use cases

Terminology

  • URL hierarchy flattening: When shouldFlattenUrlHierarchy is enabled, all pages use flat URLs regardless of their position in the page hierarchy. For example, a subpage at /parent/child-page is accessible at /child-page. This setting only changes URLs, it doesn't affect the site's page tree structure.
  • Partial route match: When shouldUsePartialRouteMatch is disabled, requests to non-existent pages return an HTTP 404, the SEO-recommended behavior. When enabled, non-existent page requests are handled by the partial route match handler, returning a 200 status code.
Did this help?