How to add Google
Preferred Sources.
Google changed the name of Preferred Sources to Favorites on December 1, 2026. The concept remains the same: a reader chooses your site and Google displays your stories to that reader more frequently. The only thing that has changed is the wording of the button and the link that it uses. This guide will explain how to add a Google Preferred Sources button to your site as it is now, with copy and paste code, a version with no JavaScript required, and instructions for WordPress, Shopify and other builders.
The whole guide.
If you added a Preferred Sources button earlier this year, skip to Already have a Preferred Sources button? You have two small edits to make.
- 01What Preferred Sources are
- 02Can your site be added?
- 03Method 1: Google's official button
- 04Method 2: A plain link
- 05Method 3: Your own design
- 06WordPress, Shopify and other platforms
- 07Where to put the button
- 08Keep it from slowing your site down
- 09Track clicks in Google Analytics
- 10Already have a Preferred Sources button?
- 11Common mistakes
- 12FAQ
What are Google
Preferred Sources (now Favorites)?
It is a reader level signal, not a ranking factor for all. Your site doesn't rise for everyone since a couple people selected it. It appears more frequently for those who selected it.
Google's Preferred Sources allow a Google user to select the sites they wish to be shown more. If a person selects your site, your articles will be more prone to appearing for them in Top Stories, with a "Favorite" badge. The same option has been carried over to AI Overviews, AI Mode and Google Discover since the December update.
sources picked by readers, as of August 2026
growth in use of the feature over 2026
more likely to click through to a site they chose
There are two numbers that publishers care about. In August 2026, Google reported that readers had selected over 600,000 different sources. On December 1 it stated that the feature had seen an increase of over 7x in the year and that users are twice as likely to click through to a site they selected.
Anything already set up will carry over. Readers' selections of Preferred Sources, and publishers they followed in Discover, were automatically added as Favorites. There is no need for anyone to select you again.
Can your site
be added?
Before you add any button, check that Google lets readers pick your site at all.
- Open Google's favorites tool at
https://www.google.com/preferences/favorites. - Search for your domain.
- If your site appears, it's eligible. If it doesn't, the button won't help yet.
Only domains and subdomains count. www.example.com and news.example.com can be picked. A subfolder such as example.com/blog can't.
The AI badge has one extra condition. To show as a Favorite in AI Overviews and AI Mode, your site has to be included in Search generative AI features in Search Console.
The button is optional. Readers can find you in the tool without it. The button just makes it a one-click choice while they're already on your page.
Google's official
button.
This is the simplest way, and the one Google suggests. It takes two pieces of HTML.
That's all the setup. Google draws the button, translates it into the reader's language and updates the wording without you having to make any changes if Google changes the name of something again.
Step 1 Put the script in your page's <head>:
<script async src="https://news.google.com/swg/js/v1/publisher.js"></script>
Step 2 Put this tag wherever you want the button to appear:
<div google-add-preferred-source-btn></div>
You can set two options on the tag:
<!-- Dark version, for dark backgrounds -->
<div google-add-preferred-source-btn data-theme="dark"></div>
<!-- Force one language instead of the reader's browser language -->
<div google-add-preferred-source-btn data-lang="en"></div>
The theme is light by default. Leave out data-lang unless your page is in a single language and you want the button to match it.
A plain
link.
If your CMS strips scripts, or you'd rather not load anything from Google, use a link. Swap example.com for your domain:
The trade-off: the reader is taken away from your page for a bit, to Google's tool. The script version will leave them on your page.
<a href="https://www.google.com/preferences/favorites?q=example.com" target="_blank" rel="noopener">
Add to favorites
</a>
You can wrap your own image instead of text:
<a href="https://www.google.com/preferences/favorites?q=example.com" target="_blank" rel="noopener">
<img src="/images/add-to-favorites.png" alt="Add to favorites on Google" width="200" height="48">
</a>
Google publishes official translated button images you can use, or you can design your own badge.
Your own design,
Google's script.
Looking for a button that's on-brand, yet still keeps readers on the page? Load the script in manual mode. It prevents Google from creating its own button, and allows you to call it from your own.
We'd add one more thing. Create a custom button that is a true link to the favorites URL and only intercept the click after the script has loaded. The button is still functional if Google's script is blocked or slow.
<script async preferred-sources-control="manual"
src="https://news.google.com/swg/js/v1/publisher.js"></script>
<button id="fav-btn" type="button">Add us to your Google favorites</button>
<script>
(self.PREFERRED_SOURCE = self.PREFERRED_SOURCE || []).push(function (preferredSource) {
preferredSource.init({ theme: 'light', lang: 'en' });
document.querySelector('#fav-btn').addEventListener('click', function () {
preferredSource.addPreferredSource();
});
});
</script>
If your site uses a bundler or JavaScript modules, Google also ships a module version:
import { preferredSource } from "https://news.google.com/swg/js/v1/publisher.mjs";
preferredSource.init({ theme: 'light', lang: 'en' });
document.querySelector('#fav-btn').onclick = () => preferredSource.addPreferredSource();
How to add it on
popular platforms.
The code is the same everywhere. What changes is where each platform lets you paste it.
WordPress
- No plugin: add a Custom HTML block where you want the button and paste the
<div>from Method 1. Add the<script>line through your theme's header settings or a header-and-footer code plugin. - With a plugin: SEOPress 10 includes a Google Preferred Sources block, and the WordPress plugin directory has several free options. If you use one, check that it has been updated to the "Add to favorites" wording and the new link.
Shopify
Go to Online Store → Themes → Edit code, open theme.liquid, and paste the script just before </head>. Then add the <div> to your blog article template, or to a Custom Liquid section in the theme editor. Apps from the Shopify App Store can do this too.
Webflow, Wix and Squarespace
All three let you add code to the site head (Webflow: Site settings → Custom code; Wix: Settings → Custom code; Squarespace: Settings → Code injection). Put the script there, then add the <div> with an embed or code block where you want the button. If your plan doesn't allow scripts, use the plain link from Method 2.
React, Next.js and other JavaScript apps
Load the script once in your root layout and render the <div google-add-preferred-source-btn> in your article component. On client-side navigation the library may not see new tags, so for apps with page transitions, Method 3 (manual mode, called on click) is the more reliable choice.
Where to put
the button.
Place the button in the place where readers have just obtained value from you. The end of each article is best: the reader has read it and liked it enough to scroll down. For news sites with loyal readers, near the byline is a good place. The site footer is low effort and is always there, but fewer people get there.
End of each article
The reader finished, liked it and scrolled down.
Near the byline
Works for loyal readers who come back often.
Site footer
Low effort, on every page, but fewer people reach it.
Avoid displaying it in a pop-up or obscuring the content. Ask at the proper time, as you are looking for a long-term relationship.
Keep it from slowing
your site down.
Google's script is additional JavaScript and most visitors of a typical page will never get to the button. On Davnoot we load it only when a button approaches the screen or when someone hovers, taps or tabs to the button. Until then, the button is just a link, and it will work at all times. The vast majority of page views do not even download the script.
- Page loads. The button is a plain link. No Google script yet.
- Button gets close. It nears the screen, or someone hovers, taps or tabs to it.
- Script loads. Only now does Google's library download, so the click keeps readers on the page.
If you do this too, make sure your Content Security Policy allows https://news.google.com in script-src, or the script will be blocked without any visible error.
Track clicks in
Google Analytics.
Google does not provide a number of readers that chose your site, but you can measure the clicks. Label each button with the location (article end, footer, etc.) and you will know which one gets the most clicks.
document.querySelectorAll('[data-fav-btn]').forEach(function (el) {
el.addEventListener('click', function () {
gtag('event', 'favorite_source_click', { placement: el.dataset.placement || 'unknown' });
});
});
Add data-fav-btn and a data-placement value (like article-end or footer) to each button.
Already have a Preferred
Sources button?
If you added one before December 2026, check two things:
- The label. Google asks publishers to replace "Preferred Sources" wording with "Add to favorites". If you used Google's own
<div>button, Google controls that text. Custom buttons and images have to be changed by hand. - The link. Old guides used
google.com/preferences/source?q=. Google's documentation now usesgoogle.com/preferences/favorites?q=. Update your links to the new address.
The script address and the google-add-preferred-source-btn tag stay the same, so the official button needs no code changes.
Common
mistakes.
Five things that stop the button from working, or from paying off.
- Using a subfolder.
example.com/blogcan't be picked. Use your domain. - Adding the button but never checking eligibility. Search for your site in the favorites tool first.
- Leaving the old label. "Add as a preferred source" now points readers to a name Google no longer uses.
- Blocking the script with your CSP. If the button never appears, check your browser console for a blocked
news.google.comrequest. - Expecting a ranking boost. Being picked helps you reach the people who chose you. It doesn't move you up for everyone else.
Questions about
Preferred Sources.
Get picked by
your readers.
A Favorites button only helps if people want more of what you publish. If you want a content and SEO plan that gives them a reason to, book a free 30-minute call.