Complete Guide

How to Add Google’s Preferred Sources Button (WordPress Plugin, Code and Deeplink)

On 20 August 2026 Google made its Preferred Sources button embeddable: a reader clicks it on your page, adds your site as a preferred source, and returns to where they were reading. This guide covers the three ways Google lets you add it, the iframe behaviour most write-ups miss, the clean WordPress plugin route, and where to place the button so it earns clicks. Honest throughout about the limit: this is a per-reader loyalty feature, not a ranking lever.

8 min read 1,559 words Updated Aug 2026

On 20 August 2026 Google made its Preferred Sources button embeddable: a reader clicks it on your page, adds your site as a preferred source, and returns to where they were reading. This guide covers the three ways Google lets you add it, the iframe behaviour most write-ups miss, the clean WordPress plugin route, and where to place the button so it earns clicks. It is honest about the limit: Preferred Sources is a per-reader loyalty feature, not a ranking lever.

3 Implementation methods Google documents for the Preferred Sources button: the standard JavaScript embed, an advanced manual route that binds the action to your own element (preferred-sources-control manual, the PREFERRED_SOURCE queue and addPreferredSource, with an ES module at publisher.mjs), and a no-JavaScript deeplink. Google Search Central, developers.google.com/search/docs/appearance/preferred-sources, August 2026
600,000+ Unique sources readers had selected across Google by late August 2026, up from more than 345,000 in May 2026, the growth Google cited when it announced the embeddable button. Google, Preferred Sources announcement, 20 August 2026
2x Click-through uplift Google reports for a preferred source over an equivalent unbadged result, citing its own studies, and the headline reason to convert a loyal reader into a preferred source. Google, Preferred Sources announcement citing Google studies, 20 August 2026

On 20 August 2026, Google made its Preferred Sources button embeddable. A reader clicks it on your page, adds your site as a preferred source, and lands straight back where they were reading. Before that, marking a site meant leaving the page for Google’s settings screen and searching for you by name. That friction is now gone, and it is the whole change.

It is worth being precise about what the button does. It changes what a reader who chose your site sees, in Top Stories and increasingly in AI answers, where a preferred source can carry a badge that sets it apart. It does not raise your rankings for everyone, and it changes nothing for readers who never selected you. Treat it as a way to convert loyal readers into repeat visibility, not as a lever on rankings. Pages that sell it as a ranking hack are overselling it.

The reason it earns a place in an AI-visibility programme is the surface it touches. A preferred source is more likely to be shown, and to be badged when cited, in AI Overviews and AI Mode. That is the Selection layer of the AI Discovery Stack. Being chosen once by a reader raises the odds of being chosen again by the machine, and repeat selection is the kind of durable signal the Stack is built around.

Check you are eligible first

Before you place anything, confirm your site actually appears in Google’s source preferences tool at google.com/preferences/source. Search for your domain. If it is not listed, the button cannot help, because there is nothing for a reader to select. The button is the last step, not the first.

Google supports domains and subdomains, but not subdirectories. example.com and news.example.com are valid targets; example.com/blog is not. The deeper question of what makes a site eligible in the first place is the subject of the companion guide on what Preferred Sources is and what determines eligibility.

The three ways Google lets you add it

Google documents three implementation routes, not the two most write-ups mention. They are not interchangeable, and each trades something away.

Two lines of HTML. A script tag that loads the library, preferably in the document head, and an empty element that Google fills with a localised, on-brand button.

<script async src="https://news.google.com/swg/js/v1/publisher.js"></script>
<div google-add-preferred-source-btn></div>

Google renders the button, translates it to the reader’s browser language, and returns them to your page after they confirm. Add data-theme="dark" for a dark background, or data-lang="en" to fix the language to one setting. You do not hard-code your domain; the library knows the page it sits on. Google publishes the full list of supported language codes if you need one other than the reader’s own.

2. The advanced button (your own element)

If you want the action bound to your own styled control rather than Google’s rendered button, load the library with preferred-sources-control="manual" so it does not render itself, then drive it through the PREFERRED_SOURCE queue and call addPreferredSource() from your element. For build pipelines, the same library is published as an ES module at publisher.mjs. This is the route most guides skip, and it is the one worth knowing if your design system will not tolerate a third-party button. It is also what makes reliable measurement possible, and it is the mode the plugin below uses for its trackable button.

An ordinary link, no script required, of the form google.com/preferences/source?q=your-domain.com. It opens Google’s general preferences screen with your site searched, where the reader still has to tick the box, so it is one action longer than the embed. One thing to get right: match your-domain.com to the exact way Google lists you, because most sites are listed under the bare domain and a leading www can return no match. Confirm yours in the source preferences tool first. Its value is that it works anywhere a script cannot go: email, social posts, or a content management system that will not let you add JavaScript. If you want it to look like a button, Google provides official badge images in light and dark that you can wrap in that link.

The catch nobody mentions, and why it shapes where you load it

The rendered button is not an image. It is an iframe served from news.google.com, and merely placing it loads publisher.js and pulls in one iframe per button on page view, before anyone has clicked. Put the raw two lines site-wide and you load Google’s library and an iframe on every page, whether or not the button is used.

The fix is simple: load the library only on the pages that actually carry a button, and use one button per page. That single decision is the difference between a clean implementation and a slow one, and it is the main thing the raw snippet gets wrong.

The clean way to do this in WordPress

Pasting Google’s script into your theme works, but it is the crude version of the job. It loads the library on every page, it has no fallback if a reader blocks the script, and it puts the button in exactly one place. So I built a small plugin, Preferred Sources Button, that does the job properly and puts all three of Google’s methods behind one setting.

  • Three display modes. The standard Google button, a custom trackable button that uses Google’s manual API for the same confirm-and-return flow, or a plain deeplink that loads no Google JavaScript at all. Which one? The standard button gives you Google’s official badge with the G, the strongest trust signal, but its click sits inside a Google frame and cannot be measured; the custom button trades the G for a click you can record; the deeplink is for anywhere a script cannot run.
  • Placed your way. A block, a shortcode, or a widget for older themes, all rendering the same.
  • Loaded only where used. Google’s library loads only on pages that carry a button, keeping its iframe off the rest of your site, with a site-wide in-head option if you want it.
  • A no-JavaScript fallback deeplink ships with every button.
  • Honest, opt-in measurement. Off by default. When you turn it on, it records the start of the flow in the GA4 or Google Tag Manager you already run. That is reliable in the custom and deeplink modes, where the click is on your own element, and deliberately absent in standard mode, where the click sits inside Google’s frame and cannot be seen.
  • Theme, alignment and language set once and overridable per placement.

It is built for WordPress.org and follows the same discipline as the LLMs.txt Curator: it sends nothing home, and it is honest about what the feature does. It changes what a reader who opted in sees; it is not a ranking product.

Here it is, live on this page:

Where to put the button

Placement is most of the result. Put it at a moment of goodwill: the end of an article a reader has just finished, or beside your share links, where the decision to trust you has already been made. Not the homepage, where a visitor has read nothing of yours yet. One button per page keeps it fast and keeps the ask clear.

Measuring interest honestly

Here is a subtlety most write-ups get wrong. Google’s standard button renders inside an iframe served from news.google.com, and a click inside that frame cannot be seen by your page. So you cannot reliably count clicks on the standard button from your own analytics, and any snippet that claims to is measuring the wrong thing.

For a reliable signal, use the custom trackable button or the deeplink, where the click happens on your own element. The plugin fires a preferred_source_flow_started event into the GA4 or Google Tag Manager you already run, and only when you switch it on. With Google Tag Manager, create a custom event trigger of that name and fire a GA4 event tag from it; with gtag.js and no container, it goes straight to GA4. Confirm it once in DebugView. Read it as the start of the flow, not a confirmed selection, which Google completes on its own screens.

The honest bottom line

None of this is a ranking shortcut, and the button will sit unclicked on a site readers have no reason to return to. It pays off when you have already earned the loyalty, and when your site is the kind Google lists as a source in the first place. That eligibility is the real work, and it is the same work that earns durable AI citation and recommendation. To see whether your site is there yet, that is what an AI visibility audit is for, and the companion guide on what determines eligibility is the place to start.

Google’s own reference is at developers.google.com/search/docs/appearance/preferred-sources.

Key Definitions

Preferred Sources button (embed)
An interactive button, made embeddable by Google on 20 August 2026, that a publisher places on their own pages. A reader clicks it, confirms in Google, and is returned to the page. It is rendered by Google’s publisher.js library as an iframe from news.google.com, supports light and dark themes and a language override, and requires the site to already appear in Google’s source preferences tool.
publisher.js and the iframe behaviour
The library at news.google.com/swg/js/v1/publisher.js that renders the button. It is not an image: placing a button loads the library and one iframe per button on page view, before any click. Loading it only on pages that carry a button, rather than site-wide, keeps that cost off the rest of the site.
Deeplink fallback
A plain link of the form google.com/preferences/source?q=your-domain.com that opens Google’s source preferences screen with the site searched. It needs no JavaScript and works in email, social posts and restrictive content management systems, at the cost of one extra action for the reader compared with the embed.

How to add Google’s Preferred Sources button

The practitioner sequence for adding the button cleanly, from eligibility to measurement.

  1. 1

    Check you are eligible

    Search your domain in Google’s source preferences tool at google.com/preferences/source. If your site is not listed there, the button has nothing to select, so stop and do the eligibility work first. Domains and subdomains qualify; subdirectories do not.

  2. 2

    Choose your method

    Use the standard JavaScript button on a normal web page. Use the advanced manual route only if you must bind the action to your own styled control. Use the deeplink where JavaScript cannot go, such as email and social posts.

  3. 3

    Add it the clean way

    In WordPress, add the button with the Preferred Sources Button plugin, through the block, the [preferred_sources] shortcode or the widget, so the library loads only where a button appears and a no-JavaScript fallback ships with it. By hand, add the two lines of Google’s standard embed, and load the library only on the pages that use it.

  4. 4

    Place it at a moment of goodwill

    Put the button at the end of an article or beside your share links, where the reader has already decided to trust you. Not the homepage. One button per page keeps the page fast and the ask clear.

  5. 5

    Track and confirm

    For a reliable signal, use the custom trackable button or the deeplink and fire a preferred_source_flow_started event into your own GA4 or Google Tag Manager, then confirm it once in GA4 DebugView. The standard Google button renders in a Google iframe, so its click cannot be measured from your page. Read the event as interest at the start of the flow, not a confirmed selection, which Google completes off-site.

Frequently Asked Questions

Does the Preferred Sources button improve my rankings?

No. It is a per-reader personalisation feature. It changes what a reader who chose your site sees in Top Stories and in AI answers, and it changes nothing for readers who never selected you. Google says preferred sources still have to publish content worth showing. Treat it as a way to turn loyal readers into repeat visibility, not as a ranking lever.

How do I add the button in WordPress?

The tidy way is a plugin. The Preferred Sources Button plugin adds the button as a block, a [preferred_sources] shortcode or a widget, and offers all three of Google’s methods behind one setting: the standard Google button, a custom trackable button that uses Google’s manual API for the same flow, or a plain deeplink with no Google JavaScript. It loads Google’s library only on pages that use a button, ships a no-JavaScript fallback, and can fire an opt-in event into your own GA4 or Google Tag Manager, which is reliable in the custom and deeplink modes. You can also paste Google’s two-line standard embed into your theme, but on its own that loads the library on every page and has no fallback.

My site is not in the source preferences tool. Will adding the button fix that?

No. The button does not make your site eligible. Eligibility is a separate matter of whether Google lists your domain in the tool at all, and Google does not publish the criteria. Check first at google.com/preferences/source, and if you are not there, the eligibility work is the real job. The companion guide covers what appears to determine it.

Standard button or deeplink, which should I use?

Use the standard button on your website: it is one action for the reader and returns them to your page. Use the deeplink in email, social posts, or any place a script cannot run. There is also an advanced manual route for binding the action to your own element, worth knowing if your design system will not tolerate a rendered third-party button.

Will the button slow my pages down?

It adds some weight, because Google renders it as an iframe from news.google.com and loads its library on page view, before any click, with one iframe per button. The way to keep it clean is to load the library only on pages that carry a button and to use one button per page. The plugin does the first of those for you; the raw two-line snippet, placed site-wide, does not.

Where should I place the button?

At a moment of goodwill: the end of an article a reader has finished, or next to your share links. Not the homepage, where a visitor has read nothing of yours yet. One button per page is plenty, and it keeps the page fast and the request clear.

The button says my site is not eligible, but the link still works. Why?

Some publishers have reported the JavaScript button showing an ineligible message while the same site can still be added through the deeplink. That is community-reported rather than confirmed Google behaviour, so it is not worth engineering around. First confirm your domain in Google’s source preferences tool. If it is listed there and the button still balks, the deeplink is a reliable way for readers to add you in the meantime.

Sean Mullins

Founder of SEO Strategy Ltd with 20+ years in SEO, web development and digital marketing. Specialising in healthcare IT, legal services and SaaS — from technical audits to AI-assisted development.

Ready to improve your search visibility?

Book a free 30-minute consultation and let's discuss your SEO strategy.

Get in Touch