Skip to content Skip to navigation
Back to the main support

How to Add a Google Preferred Sources Button with SEOPress

SEOPress Free includes a Google Preferred Sources block and shortcode so readers can choose your site as a source they want to see more often in Google Search. This preference can help readers find your articles in relevant Top Stories results; it does not guarantee a ranking or placement.

The block and shortcode were introduced in SEOPress 10. SEOPress 10.3 adds a choice between a simple link, your own button with Google’s popup flow, and Google’s official button.

Add the block

  1. Open a post, page or template in the WordPress block editor.
  2. Click Add block, search for Google Preferred Sources and insert it.
  3. In the block sidebar, open Button settings and choose a Button type.
  4. Configure the available label, logo, theme, language and domain settings.
  5. Publish or update, then test the button on the public page.

Place the block in a shared template or footer if you want to display it across several pages. Visitors complete Google’s own preference flow; account and availability requirements are handled by Google.

Choose a button type

Type Behavior Google script
Your button, Google flow (custom) Your label and optional logo open Google’s popup. The reader stays on your page. Loaded when needed.
Official Google button (google) Google renders the label, logo and appearance and handles the preference flow. Loaded when needed.
Simple link, no JavaScript (link) A link opens Google’s source preferences page in a new tab. No third-party script loaded by this mode.

Existing blocks without a saved button type keep the simple-link behavior. The shortcode also defaults to link mode unless you specify another mode.

Use the shortcode

In a Shortcode block, a compatible widget or a page builder element that executes shortcodes, use:

[seopress_preferred_source]

To use your own button with the popup:

[seopress_preferred_source mode="custom" label="Follow us on Google" icon="true" theme="auto" lang="en"]

To display Google’s official button:

[seopress_preferred_source mode="google" theme="light" lang="en"]

To link directly to a particular subdomain without the Google script:

[seopress_preferred_source mode="link" domain="news.example.com" label="Add our news site" icon="false"]

Available settings

  • Label: your button text in custom and link modes. Google controls its official button’s text.
  • Google logo: show or hide it on your button. The shortcode attribute is icon="true" or icon="false".
  • Theme: auto, light or dark for the Google-powered modes. Auto follows the visitor’s preference.
  • Language: leave automatic selection enabled or choose the Google interface language. The shortcode uses language codes such as en, fr or es.
  • Domain: leave empty to use your site’s domain for the link. Only domains and subdomains are supported, not subdirectories.

Domain overrides apply to the direct link and fallback link. The Google popup resolves the site from the current page address; a custom domain is not passed to it. If you need a button on one domain to target another domain or subdomain, use link mode.

Loading and fallback behavior

For custom and official modes, SEOPress loads Google’s library once when the button approaches the viewport or receives hover or focus. If the browser lacks the visibility observer, the library can load immediately. Link mode does not load that third-party library.

If JavaScript is disabled or the Google library is blocked or not ready, the server-rendered link remains the fallback. An existing link can therefore remain useful even when the popup is unavailable.

Test the button

  1. Check the public page on desktop and mobile.
  2. Click the button and verify the intended domain in Google’s flow.
  3. In a Google-powered mode, check the theme and language, then test with the library blocked to verify the fallback link.
  4. If nothing changes after editing, clear the page cache and check JavaScript optimization or browser blockers.