This free tool generates the code for Google’s “Add as a preferred source” button for any domain. Choose the official JavaScript button, a self-hosted badge image, or a plain text link — with light/dark themes and 17 languages. Everything runs in your browser; nothing you type is sent to our server.
Generated code
Before relying on this, confirm your domain appears in Google’s source-preferences search. Generating code does not make a site eligible, and opening the link does not add your site automatically — each reader chooses it in their own Google account. Publisher guide →
What the generator creates
- Official button (JavaScript) — loads Google’s
publisher.jsand renders Google’s own button, styled and localised by Google and kept up to date automatically. It auto-detects your domain. If the button does not appear, Google’s script is usually blocked (ad or privacy blockers) or the context is unsupported. - Badge image — Google’s official badge (17 languages, light and dark), hosted on your own site and wrapped in a link. Shows for every visitor.
- Text link — a plain link to your site’s Google source-preferences page. No script, works everywhere.
Which method should you use?
Use the official JavaScript button for Google’s real, auto-updating button. Use the badge image when you want the button visible to every visitor (including signed-out users) and prefer no third-party script. The text link is the simplest, most lightweight option.
About Google Preferred Sources
Preferred Sources lets a signed-in Google user mark your site as one they want to see more of — surfacing your content more prominently in Search’s Top Stories, the “From your preferred sources” area, and AI Overviews for that user. Only domain- and subdomain-level sites are eligible (for example example.com, not example.com/blog). For AI Overviews and AI Mode your site must also be included in the Search generative AI features in Google Search Console. Confirm your domain in Google’s source-preferences search before relying on the button — generating code does not make a site eligible.
Frequently asked questions
Is this Google preferred sources button generator free?
Yes. The tool is free and runs entirely in your browser — nothing you enter is sent to our server. Google’s Preferred Sources feature is also free to use.
Which button method works for logged-out visitors?
The badge image and the text link work for everyone. Google’s JavaScript button is rendered by Google’s script, so it may not appear where that script is blocked (ad or privacy blockers) or in some embedded contexts.
Where do I get Google’s official badge image?
Google distributes it as a ZIP of 17-language light and dark badges. Download it, upload the badge you need to your own server, then use the Badge image option above to generate the link code.
Do I need Search Console to use the button?
No — the button itself needs no verification. But to appear in AI Overviews and AI Mode your site must be included in the Search generative AI features in Google Search Console, and only domain or subdomain-level sites are eligible.
