Yoast Indexables

If you are seeing the wrong domain displaying in search results (ex: sitename.mystagingwebsite.com instead of sitename.com), it may be due to using Yoast (Yoast SEO or Yoast SEO Premium plugins).

We explain why and how to resolve below.

Overview

If Yoast (Yoast SEO or Yoast SEO Premium plugins) is used on a website and a domain is added or changed (new site, cloned site, etc) without taking steps afterward, it can result in the staging domain or previous domain showing in search results:

Search results showing .mystagingwebsite.com URL instead of primary domain.
In the above image, the https://littlesproutboutique.mystagingwebsite.com URL is the site’s staging URL and the https://littlesproutboutique.com/ URL should be displayed instead.

When a domain is switched or added to a staging site, and Yoast (Yoast SEO or Yoast SEO Premium plugins) fails to rebuild its indexables – this is where canonical URLs are stored.

This is a Yoast issue and not Pressable-specific. While the Pressable platform performs an exhaustive search-replace any time a domain is changed or site is moved, Yoast needs to have its indexables rebuilt. It should do this on its own, or provide alerts when it is needed, but sometimes it doesn’t. There are many reports on Yoast’s plugin forums about this.

How to Fix

Rebuilding/reindexing the Yoast indexables resolves the issue.

There are two ways to reindex Yoast’s indexables:

  • Option 1: The Yoast Test Helper plugin may be used to reset indexables via a site’s WP-Admin. https://yoast.com/help/how-to-reset-yoast-indexables/
  • Option 2: Site administrators may use WP-CLI to run the following WP-CLI command on the site after the site’s custom domain has been added or updated.
    •  wp yoast index --reindex  and flush the site’s cache. (more info).
    • If using Pressable’s Bulk Operations functionality to run the command across multiple sites, you may use wp --skip-themes yoast index --reindex --skip-confirmation; wp --skip-plugins --skip-themes cache flush

Yoast Support

Please contact Yoast’s support if you have additional questions or concerns: https://yoast.com/help/