=== SEOBetter ===
Contributors: seobetter
Donate link: https://seobetter.com/
Tags: seo, ai, content generation, schema, search console
Requires at least: 6.0
Tested up to: 7.1
Stable tag: 1.0.114
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI SEO and GEO for WordPress: generate cited articles and score every post for Google AI Overviews, ChatGPT, Perplexity and Gemini.

== Description ==

SEOBetter is a WordPress plugin for AI SEO and Generative Engine Optimization (GEO). It helps your content get cited by AI answer engines - Google AI Overviews, ChatGPT, Perplexity and Gemini - while still ranking in classic Google search. It scores every post for citation-readiness, generates articles with real, verifiable sources, and adds the structured data and llms.txt file that AI crawlers use to find your best pages.

SEOBetter works alongside Yoast SEO, Rank Math, All in One SEO and SEOPress. It does not replace them; it syncs its meta and schema into whichever one you already use.

https://www.youtube.com/watch?v=eyoHqCBGaiM

= What is GEO (Generative Engine Optimization)? =

Generative Engine Optimization is the practice of making content easy for AI answer engines to understand, trust and cite. Where classic SEO targets a ranking position, GEO targets a citation: your page being named as a source inside an AI-generated answer. Research on generative engines (Princeton, 2023) found that adding cited sources, quotations and statistics raised a page's visibility in AI answers by up to 40%. SEOBetter measures exactly those signals and tells you which ones each post is missing.

= What SEOBetter does for free =

* **GEO score (0-100) and SEOBetter content score** for every post and page, with a prioritized list of concrete fixes: missing citations, statistics, quotes, direct answers, structure and freshness.
* **AI article generation with your own AI key.** Connect OpenAI, Anthropic, Google Gemini, Groq, Moonshot AI (Kimi), OpenRouter, a self-hosted Ollama model, or any OpenAI-compatible endpoint. Gemini and Groq offer free-tier keys. Your key stays on your site and you pay your provider directly.
* **Real references in every article.** A free Tavily research key (1,000 searches per month on their free plan) is required for generation; it is what gives every article verifiable source links instead of unsourced AI text.
* **Three content types** - blog post, how-to and listicle - in English, localized for the US, UK, Australia, Canada, New Zealand and Ireland.
* **On-page SEO meta and JSON-LD schema:** Article, FAQ, HowTo, Breadcrumb, ItemList, Product and Organization markup, synced to Yoast, Rank Math, AIOSEO or SEOPress when present.
* **llms.txt and an AI-crawler access audit,** so ChatGPT, Perplexity and Google's AI crawlers can reach and index your best content.
* **Google Search Console connection** for ranking, impression and freshness data inside WordPress.
* **Internal-link orphan report** and an age-based content-freshness inventory.
* **Technical SEO auditor,** readability and AI-pattern checks, and a humanizer pass.
* **Free stock images** from Pexels, with an Openverse fallback.

= How SEOBetter gets your content cited by AI =

AI answer engines favour pages that are easy to verify. SEOBetter builds those signals in rather than bolting them on:

1. **Sourced claims.** Generated articles cite real, live pages found by keyword-targeted research, and the plugin verifies each link before it ships.
2. **Quotable structure.** Direct answers under question-shaped headings, key takeaways, FAQ blocks and definitions - the shapes AI engines extract from.
3. **Structured data.** JSON-LD schema that tells machines what the page is, who wrote it and what questions it answers.
4. **Discoverability.** An llms.txt file and a crawler audit that flags when robots.txt or a firewall is blocking AI crawlers.
5. **Freshness.** Search Console decay signals show which pages are losing citations and need a refresh.

= Free vs Pro =

The free plugin is complete on its own and never expires. SEOBetter Pro adds the hosted SEOBetter Cloud (no API keys to manage) plus the full content library:

* **21 content types** in total, including comparison, buying guide, review, pillar guide, recipe, case study, news article, press release and white paper.
* **29 languages** and localization for 78 countries.
* **Advanced schema:** LocalBusiness, Recipe, Review, Event, Course, JobPosting, VideoObject, SoftwareApplication, QAPage and more, plus Gutenberg schema blocks.
* **AI featured images** in your brand colours, Brand Voice profiles, deep SERP research, GSC-driven freshness diagnostics, an internal-link suggester in the editor, and bulk CSV generation on the Agency plan.

**How to upgrade:** buy a plan at [seobetter.com/pricing](https://seobetter.com/pricing), then paste your license key under SEOBetter → Settings → License. The Download Pro button appears immediately; install the Pro plugin over the free one and your settings carry across. Help and feedback: [help.seobetter.com](https://help.seobetter.com).

= Privacy =

No external request is made on activation or on normal page loads - only in response to an action you take, such as clicking Generate or connecting Search Console. The External services section below lists every service, what is sent, when, and each provider's terms and privacy policy.

== Installation ==

1. Install SEOBetter from the WordPress Plugins screen, or upload the `seobetter` folder to `/wp-content/plugins/`.
2. Activate the plugin through the "Plugins" menu in WordPress.
3. Open the SEOBetter menu in the admin sidebar and follow the setup wizard.
4. Add your AI provider API key and a free Tavily research key under SEOBetter → Settings to enable article generation.
5. (Optional) Connect Google Search Console from SEOBetter → Settings to import ranking data.

No external connection is made on activation or on normal page loads. The plugin contacts an external service only when you take an action that needs it - for example clicking Generate, connecting Search Console, or searching for a stock image.

== Frequently Asked Questions ==

= What is Generative Engine Optimization (GEO)? =
GEO is optimizing content to be cited by AI answer engines such as Google AI Overviews, ChatGPT, Perplexity and Gemini. It rewards verifiable sources, statistics, quotations, direct answers and structured data. SEOBetter scores each post against those signals and lists what is missing.

= How is AI SEO different from traditional SEO? =
Traditional SEO earns a ranking position on a results page; AI SEO earns a citation inside a generated answer. The two overlap - crawlability, structure and authority matter to both - but AI engines weigh verifiability far more heavily. SEOBetter covers both: on-page meta and schema for rankings, and citation signals for AI answers.

= What is llms.txt and does SEOBetter create it? =
llms.txt is a plain-text file at the root of a site that tells large language models which pages matter most and how the site is organized, similar in spirit to robots.txt. SEOBetter generates and serves it automatically, and the AI-crawler audit checks that AI crawlers are not being blocked.

= Is SEOBetter free? =
Yes. The GEO and SEO scoring, on-page meta, schema, technical audit, llms.txt, Search Console connection, image search and AI generation with your own provider key are free and never expire. Pro adds the hosted SEOBetter Cloud, more content types, languages and schema types.

= Do I need an API key to generate articles? =
Yes, two: an AI provider key (Gemini and Groq have free tiers; OpenAI, Anthropic, Moonshot AI, OpenRouter and Ollama also work) and a free Tavily research key, which supplies the verified source links every article includes. Pro users can use SEOBetter Cloud instead and skip both.

= Which AI providers can I use? =
OpenAI, Anthropic, Google Gemini, Groq, Moonshot AI (Kimi), OpenRouter, a self-hosted Ollama model, or any OpenAI-compatible endpoint. Keys are stored on your own site and sent only to the provider they belong to.

= Does it conflict with Yoast, Rank Math, All in One SEO or SEOPress? =
No. SEOBetter is designed to work alongside them and syncs its meta and schema into whichever one is active.

= How do I upgrade to Pro? =
Buy a plan at seobetter.com/pricing, paste the license key under SEOBetter → Settings → License, and click the Download Pro button that appears. Install the Pro plugin over the free one; your settings, keys and Search Console connection carry across.

= What does Pro include? =
The hosted SEOBetter Cloud with no API keys to manage, 21 content types, 29 languages, 78 country localizations, advanced schema types and Gutenberg schema blocks, AI featured images, Brand Voice, deep research, GSC-driven freshness diagnostics and the in-editor internal-link suggester. Higher tiers add more sites, team seats and bulk generation.

= What data does SEOBetter send to external services? =
See the External services section for a per-service breakdown of what is sent, when, and the relevant terms and privacy policies. Nothing is sent until you take an action that requires it.

= Where do I get support? =
Free support is available in the WordPress.org support forum for this plugin. Pro customers get priority support at help.seobetter.com.

== Screenshots ==

1. Dashboard: GEO and SEO scores across your site, with the posts that need attention first.
2. Article generator: pick a country and content type, connect your own AI key, and every article ships with verified sources.
3. In the editor: a live SEOBetter score with cites, quotes, tables and freshness, plus headline and rich-results preview.
4. Search Statistics: Google Search Console rankings and GEO distribution inside WordPress.
5. Content freshness inventory: every page ranked by refresh priority.
6. Features: the seven free modules and what Pro adds.
7. One keyword in, a cited article out (animated).
8. The GEO score panel while you write (animated).
9. Free forever, Pro when you scale (animated).

== External services ==

This plugin connects to several external services to provide its functionality. For each, we describe what the service is, what data is sent, and when. No external request is made on activation or on normal page loads - only in response to an action you take.

= SEOBetter Cloud API (api.seobetter.com) =
What it is: SEOBetter's own cloud service that performs AI article generation, topic research, places/local-business grounding, price verification, and license validation.
What is sent: your generation inputs (topic, keywords, content type, language, country, and related prompt settings), your site URL, and your license key if you have entered one. For topic research, the keyword or seed topic.
When it is sent: only when you click Generate, request topic suggestions, or after you have entered a license key (validation). No data is sent on activation or on normal page loads.
Optional places-data keys: if you save a Foursquare, HERE, or Google Places API key under Settings - Places Integrations, that key is included in generation and research requests so the SEOBetter Cloud API can query the matching places provider on your behalf to ground local-business content in real listings. Nothing is sent to those providers directly from your site. Each provider has its own terms and privacy policy: Foursquare https://foursquare.com/legal/terms and https://foursquare.com/legal/privacy - HERE https://legal.here.com/en-gb/terms and https://legal.here.com/en-gb/privacy - Google Maps Platform https://cloud.google.com/maps-platform/terms and https://policies.google.com/privacy
What is NOT sent: your WordPress admin password, password hashes, secret keys/salts, auth cookies, or your site visitors' personal data.
Provided by SEOBetter. Terms: https://seobetter.com/terms - Privacy: https://seobetter.com/privacy

= Your own AI provider - bring your own key (OpenRouter, OpenAI, Anthropic, Google Gemini, Groq, Moonshot AI (Kimi), Ollama, or a custom endpoint) =
What it is: instead of the SEOBetter Cloud API, you can enter your own API key for a third-party AI provider, and the plugin then calls that provider directly to generate article text. You choose the provider and paste the key in Settings; no third-party key is configured by default.
What is sent: your API key (only to the provider it belongs to) and your generation inputs (topic, keywords, content type, language, country, and the related prompt text).
When it is sent: only when you click Generate while a provider key is configured. Nothing is sent on activation or on normal page loads.
Each provider is an independent company with its own terms and privacy policy:
- OpenRouter (openrouter.ai): https://openrouter.ai/terms and https://openrouter.ai/privacy
- OpenAI (api.openai.com): https://openai.com/policies/terms-of-use/ and https://openai.com/policies/privacy-policy/
- Anthropic (api.anthropic.com): https://www.anthropic.com/legal/consumer-terms and https://www.anthropic.com/legal/privacy
- Google Gemini (generativelanguage.googleapis.com): https://ai.google.dev/gemini-api/terms and https://policies.google.com/privacy
- Groq (api.groq.com): https://groq.com/terms-of-use/ and https://groq.com/privacy-policy/
- Moonshot AI / Kimi (api.moonshot.ai): https://platform.moonshot.ai/docs/agreement/modeluse and https://platform.moonshot.ai/docs/agreement/userprivacy
- Ollama (a server you run yourself, local or self-hosted): requests go only to the endpoint URL you configure. https://ollama.com/
If you configure a custom OpenAI-compatible endpoint, requests go only to the URL you enter.

= Google Search Console / Google OAuth (accounts.google.com, oauth2.googleapis.com, www.googleapis.com) =
What it is: Google's Search Console API, used to import your site's search-ranking and impression data.
What is sent: the OAuth authorization you grant, and your verified site URL when querying ranking/impression data.
When it is sent: when you connect Search Console, and when you (or a sync you enabled) refresh ranking data.
Provided by Google LLC. Terms: https://policies.google.com/terms - Privacy: https://policies.google.com/privacy

= Pexels (api.pexels.com, images.pexels.com) =
What it is: Pexels' royalty-free stock-image API, used for in-editor image search.
What is sent: your image search query.
When it is sent: when you search for an image.
Provided by Pexels. Terms: https://www.pexels.com/terms-of-service/ - Privacy: https://www.pexels.com/privacy-policy/

= Openverse (api.openverse.org) =
What it is: the Openverse open-licensed media API, used for in-editor image search.
What is sent: your image search query.
When it is sent: when you search for an image.
Provided by Openverse (a WordPress.org project); its data handling is covered by the WordPress.org privacy policy. API docs: https://api.openverse.org/v1/ - Privacy: https://wordpress.org/about/privacy/

= OpenStreetMap / Nominatim (nominatim.openstreetmap.org) =
What it is: the OpenStreetMap Nominatim geocoding service, used to ground local-business content in real places.
What is sent: the location or place name you supply.
When it is sent: when you generate location-based content, or use the geocode button in a schema block, that requires geocoding.
Provided by the OpenStreetMap Foundation. Terms: https://operations.osmfoundation.org/policies/nominatim/ - Privacy: https://wiki.osmfoundation.org/wiki/Privacy_Policy

= Tavily (api.tavily.com) =
What it is: an AI web-search API used to gather authoritative sources and citations during article generation. Required for article generation on the Free tier (it powers the reference links in every article); you provide your own key, and Tavily's free plan includes 1,000 searches per month.
What is sent: your Tavily API key and the search query (your keyword and related citation terms).
When it is sent: only when you generate or optimize content and have configured a Tavily key.
Provided by Tavily. Terms & Privacy: https://tavily.com/

= DuckDuckGo (duckduckgo.com) =
What it is: DuckDuckGo web search, used as a no-key fallback to find supporting sources and citations during article generation.
What is sent: the search query derived from your topic and keyword.
When it is sent: only during content generation, and only when a keyed search provider (such as Tavily) is not configured.
Provided by DuckDuckGo. Terms: https://duckduckgo.com/terms - Privacy: https://duckduckgo.com/privacy

= Crossref (api.crossref.org) =
What it is: the Crossref scholarly metadata API, used to validate DOIs and citation metadata in academic/scholarly content.
What is sent: the DOI or citation identifier being validated.
When it is sent: only during generation of content that includes scholarly references.
Provided by Crossref. Terms: https://www.crossref.org/membership/terms/ - Privacy: https://www.crossref.org/operations-and-sustainability/privacy/

= Lorem Picsum (picsum.photos) =
What it is: a placeholder-image service, used as a last-resort image when no Pexels or Openverse result is available.
What is sent: only the requested image dimensions (no personal or site data).
When it is sent: only when a placeholder image is inserted during content generation.
Provided by Lorem Picsum. More info: https://picsum.photos/

= Bunny Stream (iframe.mediadelivery.net) =
What it is: the video host for SEOBetter's optional 3-minute intro video on the Settings screen.
What is sent: nothing on a normal page view - the player is click-to-load, so your browser only requests the video from Bunny Stream after you press play (a standard embedded-video request).
When it is sent: only when you press play on the intro video.
Provided by BunnyWay d.o.o. Terms: https://bunny.net/tos/ - Privacy: https://bunny.net/privacy/

= DeskCrew (deskcrew.io) =
What it is: DeskCrew hosts the SEOBetter product changelog. The plugin shows those changelog entries in the admin Announcements drawer.
What is sent: when you open a SEOBetter admin screen, the plugin makes a server-side request to deskcrew.io for the public changelog (a read-only JSON feed identified by a publishable key). The request carries no personal data. No browser script from deskcrew.io is loaded.
When it is sent: only while viewing a SEOBetter admin screen, and the result is cached for several hours. Nothing is sent on activation or on front-end page loads.
Provided by DeskCrew. Privacy: https://deskcrew.io/privacy

== Changelog ==

= 1.0.114 =
* The External services section of this readme now lists Moonshot AI (the Kimi provider added in 1.0.112) with links to its terms of service and privacy policy, and states that any optional places-data API keys you save in Settings are sent to the SEOBetter Cloud API so it can query those providers on your behalf. Documentation-only release; no code changes.

= 1.0.113 =
* Any number of AI providers can now be saved (one active at a time, switch whenever you like) - the previous one-provider limit is removed.
* Pasting a key that belongs to a different provider is now caught at save time with a message naming the mismatch, instead of being accepted and failing later during generation. Keys are checked against each provider's documented prefix.

= 1.0.112 =
* The internal paid-tier feature catalog is removed from the package entirely. It was never consulted by anything in this plugin, but its presence could read as license gating of local functionality; now the licensing code contains no feature map at all, and the one capability check always answers yes. License checks that remain gate only the hosted cloud service.
* AI provider catalog refreshed to the current model generation: Claude Opus 5 and Sonnet 5, GPT-5.6 Sol, Gemini 3.7 Flash, and a new Kimi (Moonshot AI) provider with the K3 and K2.6 models. Deprecated Groq Llama models removed per Groq's migration guidance, and every OpenRouter model id was re-verified against the live OpenRouter catalog. Provider defaults moved off deprecated models.

= 1.0.111 =
* Every JavaScript global the plugin creates now carries the seobetter prefix. The admin data objects are renamed (seobetterGenMain, seobetterGenCountry, seobetterDiag, seobetterGsc), the content-generator scripts run inside closed scopes instead of the page's global scope, and the few functions HTML attributes call are exported explicitly as seobetter-prefixed names. No behaviour changes; this removes any chance of a name collision with another plugin or theme.

= 1.0.110 =
* Free generation no longer stops with an upgrade message. When the prompt service declines a request, generation continues on the built-in local engine instead of aborting the article, and the message machinery behind that stop is removed from the package at build time. The Features screen lead line no longer implies any listed module is locked. The dashboard header carries no paid-tier button handling. Entering a purchased Pro key now shows the Download SEOBetter Pro button in the success notice - previously the notice described a download the page never showed. The translation template file is no longer bundled; wordpress.org builds language packs from the plugin source directly.
* Meta descriptions can no longer end mid-sentence. When the model writes past its length budget and trails off, the description is repaired to its last complete sentence, or to a clean word boundary with dangling connector words removed - the defensive treatment meta titles have had since 1.0.68.

= 1.0.109 =
* The free package now contains only what the free plan offers. Removed: the Brand Voice settings card, the Author Bio tab (its form was already absent), the AI-image-only branding fields (business name, description, things to avoid, provider and API key selectors, logo upload), the Pro+ upsell panels on the Internal Links, Freshness and Search Statistics screens, the locked rows on the Features screen, and the Bulk Generate links to a screen this package does not include. Brand colors, the image style preset and the article-title overlay stay - they drive the styling and featured-image composition on free stock images. Free generation runs on your own AI key; the settings screens no longer state a per-site article allowance.

= 1.0.107 =
* WordPress.org review compliance release. The free package no longer contains the features it does not offer, rather than disabling them. The content-type selector ships three types, the country selector six, and the language selector English only, with the handling for everything else removed at build time; the 29-language string tables, the Brand Voice field and the long-form word-count options go with them. The per-post freshness diagnostic and the internal-link suggestions panel are gone too, along with their editor sidebar panels, metabox tab and drawer, so no padlock badge, locked option or upgrade prompt for an absent feature remains on any screen, and no local licence check survives in the package. The exported HTML document no longer carries a style block. The branding logo preview is now built through the DOM API instead of string concatenation, so an uploaded file name containing a quote character can no longer inject markup into the Settings screen. All admin JavaScript now loads from enqueued .js files with server values passed through wp_localize_script instead of being assembled in PHP; that change surfaced and fixed a bug where two truncated script blocks stopped the Generate screen's JavaScript from running at all.

= 1.0.106 =
* WordPress.org review compliance release. Pro-only local features are now physically absent from the free package (removed at build time, not disabled by a license check): the AI Assistant block, the bulk generator, cannibalization and citation-tracker screens, and the llms-full.txt / multilingual llms.txt endpoints. All admin output is escaped at the point of output, output buffers open and close in the same scope, internal case-conversion constants are prefixed, and generated-article styling now loads via wp_enqueue_style instead of inline style blocks. The fal image provider is not part of the free plugin and its External services entry was removed. Selecting a content type no longer moves the word-count selector above the free 1,500-word limit; the recommended Pro length is shown as a hint instead.

= 1.0.105 =
* The free Tavily research key is now required to generate articles on the Free tier, and the setup wizard walks you through adding it. This closes the silent failure where articles generated with an AI key alone contained no reference links - references are what make articles rank and earn AI citations. Tavily's free plan (1,000 searches/month) covers 100+ articles.

= 1.0.104 =
* Compliance and security release for the WordPress.org review. Pro-only local features are no longer included in the free package (the internal-linking suggester engine, author bio Person schema, freshness diagnostic, AI featured-image providers, citation tracker, and the llms.txt Pro variants); the free orphan-pages report, basic llms.txt and Pexels images are unchanged. The plugin no longer deactivates other plugin copies. All admin scripts and styles now load through the WordPress enqueue APIs, output escaping and nonce coverage were tightened across the plugin, REST endpoints gained stricter capability checks, and the remote font download was removed. The Tavily key field is now available on the free tier, the intro video loads only when you press play, and the External services documentation was completed.

= 1.0.103 =
* WordPress Plugin Check compliance: switched to wp_strip_all_tags(), scoped the internal-link custom-table queries (prepared values, identifier-safe table names), and annotated a read-only admin-screen check.

= 1.0.102 =
* Free article generation is now bring-your-own-key: connect your own AI provider (Gemini, Groq and Qwen have free tiers, plus OpenAI, OpenRouter and Ollama) for up to 30 articles per site, or use the built-in local engine with no key. SEOBetter Cloud generation is now a Pro feature.
* Onboarding, dashboard and settings copy updated to match; assorted housekeeping.

= 1.0.35 =
* Maintenance release: WordPress Plugin Check compliance fixes and housekeeping.

= 1.0.0 =
* Initial WordPress.org release of the free SEOBetter edition.

== Upgrade Notice ==

= 1.0.102 =
Free article generation now runs on your own AI key (free-tier keys work) or the built-in local engine; hosted Cloud generation moves to Pro.

= 1.0.0 =
Initial free release of SEOBetter.
