SEO User Config API: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

Enable URL flattening to improve page discoverability

If you want all pages to have clean, flat URLs regardless of their position in the page hierarchy, you can read the current SEO configuration and enable URL flattening.

To enable URL flattening:

  1. Call Get SEO User Config to retrieve the current configuration, including the latest revision.
  2. Call Update SEO User Config with:
    • seoUserConfig.revision set to the value returned in step 1.
    • seoUserConfig.shouldFlattenUrlHierarchy set to true.

Switch to SEO-friendly 404 for non-existent pages

If a site is returning 200 for non-existent pages and you want to switch to the SEO-recommended 404 behavior, you can update the SEO configuration to disable partial route matching.

To switch to SEO-friendly 404 responses:

  1. Call Get SEO User Config to retrieve the current configuration, including the latest revision.
  2. Call Update SEO User Config with:
    • seoUserConfig.revision set to the value returned in step 1.
    • seoUserConfig.shouldUsePartialRouteMatch set to false.
Did this help?