From 87c7a7f0ad562542284762ace4b39a42308c6063 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 07:05:45 +0000 Subject: [PATCH] docs(customization-free): Document new MyYoast OAuth redirect URI filters Adds documentation for two new filters introduced in Yoast SEO 28.1-RC1 that allow developers to customize OAuth callback URL registration for non-standard hosting setups (reverse proxies, alternate admin URLs). RC: 28.1-RC1 --- .../myyoast-oauth-redirect-uri-filters.md | 116 ++++++++++++++++++ sidebars.js | 1 + 2 files changed, 117 insertions(+) create mode 100644 docs/customization/yoast-seo/filters/myyoast-oauth-redirect-uri-filters.md diff --git a/docs/customization/yoast-seo/filters/myyoast-oauth-redirect-uri-filters.md b/docs/customization/yoast-seo/filters/myyoast-oauth-redirect-uri-filters.md new file mode 100644 index 00000000..6370ebe1 --- /dev/null +++ b/docs/customization/yoast-seo/filters/myyoast-oauth-redirect-uri-filters.md @@ -0,0 +1,116 @@ +--- +id: myyoast-oauth-redirect-uri-filters +title: "Yoast SEO: Customize MyYoast OAuth redirect URIs" +sidebar_label: MyYoast OAuth redirect URI filters +--- + +Yoast SEO uses an OAuth 2.0 flow to connect your site to MyYoast. In standard WordPress setups the plugin automatically determines the correct OAuth callback URL. For non-standard setups — reverse proxies, alternate admin URLs, staging environments with custom domains — two filters let you override these URLs. + +## `wpseo_myyoast_redirect_uris` + +**Source**: `src/myyoast-client/infrastructure/wordpress/redirect-uri-provider.php` + +Filters the redirect URIs registered with MyYoast for this site. The plugin registers a list of allowed callback URLs with the MyYoast OAuth server. By default the list contains only the site's canonical admin callback URL. Use this filter to add extra URIs (e.g. because your site is reachable via multiple hostnames), to replace the canonical URL, or to remove URIs that should not be allowed. + +The returned value must be an array of non-empty strings. If the filter empties the array, Yoast SEO falls back to the canonical admin callback URL so that at least one URI is always registered. + +### Parameters + +| Parameter | Type | Description | +|---|---|---| +| `$redirect_uris` | `string[]` | The redirect URIs to register. Defaults to an array containing only the canonical admin callback URL. | + +### Usage + +#### Adding an extra redirect URI for a reverse-proxy domain + +```php +