Author: Web-Observer

  • Google AI Mode Updates Oct 2026: Inline Links, Preferred Sources & How to Get Cited

    Google AI Mode Updates Oct 2026: Inline Links, Preferred Sources & How to Get Cited

    Short answer: On October 15, 2026, Google announced five updates to AI Mode and AI Overviews that put more links, Preferred Sources highlights, and creator context in front of searchers. For publishers, the practical play is the same as classic SEO plus generative engine optimization (GEO): publish clear, cite-worthy pages, stay included in Search generative AI features, invite readers to add you as a Preferred Source, and track AI Overviews / AI Mode impressions in Search Console’s Generative AI performance report.

    This guide breaks down what changed in Hema Budaraju’s official post, More ways to connect with the web from Search, why Preferred Sources and inline citations matter for GEO, how to structure content so it can earn those links, and how to measure the result without inventing click data Google does not publish.

    What Google announced on October 15, 2026

    Google framed the release as making AI Search “simpler, more visual, and more engaging,” and tied it to rising user demand for source choice. The post states that the number of people who use Preferred Sources has grown by more than 7x since the start of the year. The five product updates below are taken directly from that announcement.

    1. More inline links, higher in responses: Google says it has made continued and substantial increases to inline links in AI experiences, and is launching updates so those links appear higher up in responses more frequently.
    2. Dedicated “official websites” section (test): A new display will prominently surface one or two official places to complete a task or get exact info, at the top of a response, with context about why each link is useful.
    3. Timely-article carousels, expanding globally: Prominent carousels for timely articles in AI Search features are rolling out to additional locations and languages. These carousels also highlight Preferred Sources.
    4. More prominent related-article links: Links shown at the end of some AI responses get image thumbnails and a more clickable design.
    5. Clickable creator / publisher Search profiles in AI Mode: Google started testing clickable creator and publisher names on video results that link to their Search profiles in AI Mode.

    None of these changes invent a new ranking “hack.” Google’s long-standing AI features documentation still says there are no additional technical requirements beyond being indexed and eligible to appear in Search with a snippet, and that foundational SEO remains the path in.

    Why Preferred Sources and citations matter for GEO

    Generative engine optimization (GEO) is the practice of earning visibility when AI systems answer questions with your pages as supporting links. Google’s October updates raise the surface area for that visibility: more inline links earlier in the answer, Preferred Sources called out in news carousels, and related links that look more like destinations users will click.

    Preferred Sources is a user preference, not a publisher ranking boost you can buy. Google’s Preferred Sources guide for publishers explains that when someone selects your site, your content is more likely to appear in Top Stories with a preferred badge, and in AI Mode and AI Overviews your content can be highlighted with a preferred badge for those users. Eligibility for Preferred Sources in AI features also requires that your site remains included in Search generative AI features in Search Console.

    That combination matters commercially: Preferred Sources usage is growing fast (Google’s >7x figure), AI Overviews and AI Mode already reach huge audiences, and Google has previously said clicks from results pages with AI Overviews tend to be higher quality. For a publisher stack focused on AI search, this is where audience loyalty and cite-worthy content meet.

    October 2026 AI Mode / AI Overviews changes at a glance

    UpdateWhat Google is doingPublisher takeaway
    Inline linksMore links, shown higher in AI responses more oftenAnswer the question early; use clear, linkable section titles and definitions AI can quote
    Official websites section (test)Dedicated top section for 1–2 official pages, with contextOwn the canonical task page (docs, pricing, login, official guide) with unambiguous titles
    Timely article carouselsRolling out globally; highlight Preferred SourcesPublish fresh reporting on timely queries; encourage Preferred Source adds
    Related article linksThumbnails + more clickable end-of-response designWrite angle-rich follow-ups; strong titles and featured images help related modules
    Creator / publisher profilesClickable names on video results → Search profiles in AI ModeKeep Search profiles complete if you publish video; treat brand consistency as a signal of trust

    How to structure content to earn inline links and official-site treatment

    Google does not publish a checklist that guarantees an inline citation. What it does publish is consistent: helpful, reliable, people-first content; crawlable text; strong page experience; and no special AI-only schema. The tactics below translate those principles into page structure that works well when models pull supporting links.

    1. Lead with a cite-ready answer

    Put a one- or two-sentence direct answer near the top, then expand. Inline links tend to attach to specific claims and phrases. Vague introductions give the model less to hang a link on. Our walkthrough of Google’s official guide to AI search optimization covers the same principle from Google’s documentation.

    2. Own one clear “official” URL per task

    The new official-websites test is aimed at queries where only one or two places complete the job. For product and documentation sites, that means a single canonical page for “pricing,” “download,” “API reference,” or “how to add Preferred Sources”—not three competing URLs with overlapping titles. Use consistent branding, an obvious H1, and first-party evidence (screenshots, dated changelogs, original data).

    3. Make sections modular for query fan-out

    Google notes that AI Overviews and AI Mode may use query fan-out: multiple related searches across subtopics. Pages that answer several related sub-questions with their own H2/H3 blocks, short definitions, and comparison tables are easier to cite across those sub-queries. Structured explainers such as our GraphRAG vs Vector RAG comparison follow that pattern.

    4. Publish timely angles with durable depth

    Carousels for timely articles reward freshness and substance. Lead with the news hook (who announced what, when, and the official URL), then add evergreen how-to sections so the page stays useful after the news cycle. That hybrid format is also easier for related-article modules to surface later.

    5. Support related links with titles and thumbnails

    End-of-response related links now emphasize thumbnails and clickability. Use descriptive titles, a real featured image (not a generic stock collage), and internal links between related pieces so Google’s systems—and users—can move through your cluster.

    How to get readers to add you as a Preferred Source

    If your domain appears in Google’s source preferences tool, Google documents three publisher implementations:

    • Standard JavaScript button (recommended): load https://news.google.com/swg/js/v1/publisher.js and place <div google-add-preferred-source-btn></div> where you want the button.
    • Advanced / custom UI: initialize the Preferred Sources SDK and bind addPreferredSource() to your own button.
    • Deeplink: link users to https://www.google.com/preferences/source?q=YOUR_DOMAIN from newsletters, social posts, or on-page CTAs.

    Only domain-level and subdomain-level sites are eligible (for example https://www.example.com/), not a subdirectory like /blog. Appearing as a Preferred Source is not required to be cited in AI features, but for users who already trust you, the preferred badge and carousel highlighting are meaningful. Also confirm Settings → Search generative AI in Search Console is set to include your site; exclusion removes eligibility for AI Overviews, AI Mode, and Preferred Sources display in those features.

    Publisher checklist for AI Mode citations (Oct 2026)

    TaskWhereWhy it matters now
    Confirm Search generative AI = IncludeSearch Console → SettingsRequired for AI features and Preferred Sources in AI Mode / AI Overviews
    Add Preferred Sources button or deeplinkHigh-traffic articles / newsletterConverts loyal readers into users who see your preferred badge
    Rewrite top pages with cite-ready introsYour GEO pillar and money pagesSupports higher / more frequent inline links
    Consolidate official task URLsDocs, pricing, product, how-to hubsAligns with the official-websites display test
    Ship timely + evergreen hybridsNews and tutorial clusterFeeds expanding timely-article carousels
    Review Generative AI impressions weeklySearch Console Generative AI reportImpressions only—use as a visibility floor, not a click report
    Keep Search profiles current (video publishers)Google Search profile surfacesSupports the new clickable creator / publisher tests

    How this ties to Search Console Generative AI performance

    Since August 31, 2026, Search Console’s Generative AI performance report is available worldwide. It shows impressions for AI Overviews and AI Mode, filterable by page, country, device, and date. It does not report separate clicks for those features; clicks remain mixed into the Web search type of the main Performance report.

    Use the Generative AI report to find which URLs already earn AI visibility, then improve those pages first. Pair it with GA4 for on-site engagement, remembering that AI Overviews and AI Mode visits are counted as Organic Search in GA4—not as the AI Assistant channel. For a full measurement stack across ChatGPT, Gemini, Copilot and Google AI surfaces, see how to track AI referral traffic in 2026.

    Google has also said that when people click from search results pages with AI Overviews, those clicks tend to be higher quality (users are more likely to spend more time on the site). Treat rising Generative AI impressions on a page as a cue to protect and expand that URL, not as a reason to thin it out.

    A practical GEO workflow after the October updates

    1. Pull the top 20 pages by Generative AI impressions for the last 28 days.
    2. For each page, add or tighten a short-answer block, FAQ, and one comparison or steps table.
    3. Link each page into your GEO cluster (pillar → supporting guides → related explainers).
    4. On your highest-engagement posts, add the Preferred Sources button or a clear deeplink CTA.
    5. For product/docs properties, audit whether “official” intents resolve to one URL.
    6. Re-check impressions two to four weeks later; annotate the October 15 product update in your notes so you do not misread seasonality.

    If you draft or audit pages with AI assistants, keep prompts tied to verifiable claims and official docs—our ChatGPT prompts for SEO are a useful scaffold, not a substitute for primary sources.

    What not to do

    • Do not invent click-through rates or Preferred Sources “ranking factors” Google has not published.
    • Do not create special AI-only HTML files or fake schema; Google says no special schema.org markup is required for AI features.
    • Do not exclude your site from Search generative AI unless you intentionally want zero AI-feature impressions and traffic.
    • Do not chase every AI Mode UI experiment with thin doorway pages—query fan-out rewards depth and diversity of helpful links, not duplicates.

    FAQ

    What changed in Google AI Mode in October 2026?

    On October 15, 2026, Google announced more inline links higher in AI responses, a test of a dedicated official-websites section with context, global expansion of timely-article carousels that highlight Preferred Sources, more prominent related-article links with thumbnails, and a test of clickable creator/publisher Search profiles in AI Mode. Preferred Sources usage has grown more than 7x since the start of the year, according to Google.

    How do I get cited in Google AI Overviews and AI Mode?

    Google says there is no special AI-only optimization. Pages must be indexed and eligible to appear in Search with a snippet. Focus on helpful, people-first content, clear text, strong page experience, and topical depth. Structure pages with cite-ready answers, modular sections, and canonical “official” URLs for task queries.

    What is Preferred Sources and why does it matter?

    Preferred Sources lets users choose sites they want highlighted in Top Stories, AI Mode, and AI Overviews. Selected sites can show a preferred badge for those users, and timely-article carousels highlight Preferred Sources. Publishers can add a Google button or deeplink so readers can select them. The site must remain included in Search generative AI features.

    Does Search Console show clicks from AI Mode?

    The Generative AI performance report shows impressions for AI Overviews and AI Mode by page, country, device, and date. Separate clicks for those features are not broken out there; they remain in the Web search type of the main Performance report. Use impressions as a visibility signal and GA4 for on-site behavior.

    Do I need special schema for AI Overviews?

    No. Google’s AI features documentation states you do not need new machine-readable files or special schema.org structured data to appear in AI Overviews or AI Mode. Keep any structured data you already use accurate and aligned with visible page text.

  • How to Track AI Referral Traffic in 2026: GA4, Search Console & Bing

    How to Track AI Referral Traffic in 2026: GA4, Search Console & Bing

    Short answer: To track AI referral traffic in 2026, start with the AI Assistant channel that Google Analytics 4 now includes in its default channel group, then break it down by Session source to see ChatGPT, Gemini, Copilot, Perplexity and others individually. Add Google Search Console’s Generative AI performance report for AI Overviews and AI Mode impressions, Bing Webmaster Tools’ AI Performance report for Copilot citations, and your server logs for AI crawler activity. Treat every AI number as a floor: visits that arrive with no referrer and no UTM tag still land in Direct.

    That last point stopped being theoretical this month. Between roughly October 8 and October 15, 2026, many sites saw ChatGPT referrals fall sharply while Direct traffic rose on the same pages. Analysts traced it to ChatGPT links that opened without the utm_source=chatgpt.com tag and without a referrer; OpenAI reportedly confirmed it was a bug and a fix rolled out on October 15. This guide explains what happened, how to clean up your reports, and how to build an AI traffic measurement setup that survives the next change.

    What happened to ChatGPT referral traffic in October 2026

    According to Search Engine Journal’s reporting, ChatGPT-attributed sessions in GA4 dropped sharply in several datasets starting around October 9, shortly after GPT-6 began rolling out on October 7–8. Adobe’s Cedric Huesler compared about 500 pages where ChatGPT drove at least 5% of visits and found ChatGPT visits down about 31,000 a day while Direct visits rose about 26,000 a day over October 9–13 versus the previous week. Search Engine Land reported the same pattern.

    The mechanism was simple: inline links inside some ChatGPT answers opened in a new tab with the browser told to withhold the referrer, and the UTM tag was missing. With no tag and no referrer, analytics tools have nothing to attribute, so the visit is filed as Direct. Links in the Sources panel and shopping links reportedly kept their tags. Huesler later said OpenAI confirmed the bug on October 14 and that tagged ChatGPT clicks were back to roughly 95–100% of normal on October 15. OpenAI’s own release notes did not describe the fix, so treat that as well-sourced industry reporting rather than an official statement.

    What to do now: annotate October 8–15, 2026 in your analytics, and avoid month-over-month or week-over-week ChatGPT comparisons that straddle that window. If ChatGPT is a meaningful source for you, review ChatGPT and Direct traffic side by side for the landing pages ChatGPT usually sends people to.

    Why AI traffic is hard to measure in the first place

    Classic referral tracking depends on two signals: the HTTP referrer (the page the visitor came from) and campaign parameters such as utm_source. AI assistants control both. Native mobile apps often send no referrer at all, and a single change to how an assistant opens links can remove both signals overnight. That is why SEJ noted that a large share of mobile ChatGPT visits on some sites relied on the UTM tag alone.

    Google’s own AI features are a separate case. Visits from AI Overviews and AI Mode come from Google Search, so GA4 counts them as Organic Search, not as AI Assistant traffic. If you are working on generative engine optimization (GEO), you need different tools for Google’s AI surfaces and for third-party chatbots.

    The AI traffic measurement stack at a glance

    Tool / data sourceWhat it showsCoversMain limitation
    GA4 AI Assistant channelSessions, engagement and conversions from recognized AI assistant referrersChatGPT, Gemini, DeepSeek, Copilot, Grok and others on Google’s (unpublished) listMisses visits with no referrer and no UTM tag
    GA4 custom channel groupYour own rules for AI sources, e.g. one channel per assistantAny source you can match by regexStill depends on a source value existing
    Search Console Generative AI performance reportImpressions in AI Overviews and AI Mode by page, country, device and dateGoogle AI Overviews, AI ModeImpressions only; clicks stay mixed into the Web search type
    Bing Webmaster Tools AI PerformanceCitations, grounding queries, cited pages; new Topics Portfolio (beta)Microsoft Copilot, Bing AI summaries, select partnersDirectional estimates; small sites may see little data
    Server / CDN logsRequests from AI crawlers and user-triggered fetchersOAI-SearchBot, ChatGPT-User, GPTBot and other botsShows bot fetches, not human clicks
    Self-reported attribution“How did you hear about us?” answersAny assistant, including untagged app trafficSmall samples, needs a form or checkout step

    Step 1: Use GA4’s built-in AI Assistant channel

    Google added an AI Assistant channel to GA4’s default channel group. Google describes it as the channel by which users arrive “from sources like ChatGPT, Gemini, Deepseek, Copilot, or Grok,” and it explicitly excludes AI Overviews and AI Mode. Under the hood, GA4 sets the medium to ai-assistant and the campaign to (ai-assistant) when the referrer matches its list of AI assistants.

    1. Open Reports → Acquisition → Traffic acquisition.
    2. Keep Session default channel group as the primary dimension and find the AI Assistant row.
    3. Add Session source as a secondary dimension to split the channel by assistant (for example chatgpt.com, gemini.google.com, perplexity.ai).
    4. Switch the table to Landing page to see which articles AI assistants send people to, then compare engagement rate and key events against Organic Search.

    Because GA4 does not publish the exact list of AI referrers it recognizes, check your Referral channel too. If a newer assistant still shows up there, it is a sign you need a custom rule.

    Step 2: Build a custom AI channel group for full control

    Google’s custom channel groups documentation includes an AI assistants example. Custom groups apply retroactively to your reports, and standard properties can have two custom groups with up to 50 channels each. Traffic goes into the first channel it matches, so order matters.

    1. Go to Admin → Data display → Channel groups and click Create new channel group (this copies the default group).
    2. Click Add new channel, name it something like AI assistants, and add a condition on Source with matches regex.
    3. Use a regex that names the assistants you care about, for example: .*(chatgpt\.com|openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai|deepseek\.com|grok\.com).*
    4. Click Reorder and move the new channel above Referral (and above Organic Search if any of your patterns could overlap with it).
    5. Save, then select the new group as the primary dimension in Traffic acquisition. Optionally make it your property’s primary channel group.

    Want a per-assistant view? Create separate channels (ChatGPT, Gemini, Perplexity, Claude, Copilot) instead of one combined channel. Review the regex every quarter: assistants change domains and link formats, and SEJ reported that Gemini started adding UTM parameters to its outbound links in early October 2026, so check what source values actually appear in your data before writing rules.

    Step 3: Measure Google AI Overviews and AI Mode in Search Console

    Google’s AI features documentation says sites appearing in AI Overviews and AI Mode are included in the Search Console Performance report under the Web search type. Since August 31, 2026, Search Console also offers a Generative AI performance report that shows impressions in AI Overviews and AI Mode, which you can slice by page, country, device and date.

    Use it to find the pages that Google’s AI features already show, then make sure those pages answer the question quickly and link deeper into your topic cluster. Our breakdown of Google’s official guide to AI search optimization covers what Google says actually helps (and what to skip).

    Step 4: Track Copilot citations in Bing Webmaster Tools

    Bing’s AI Performance report shows the grounding queries and pages for which your site is cited in Microsoft Copilot, Bing’s AI summaries and select partner integrations. On October 13, 2026, Microsoft added Topics Portfolio (beta), which groups your grounding queries into themes and shows Topic Size, Sites Cited and Queries, plus Opportunity Queries where other sites are cited and yours is not.

    For content planning, that opportunity list is the most useful part: it is effectively a gap analysis for AI answers. Microsoft says the numbers are directional and that smaller sites may see a shorter list or no Topics Portfolio tab at all.

    Step 5: Check server logs for AI crawlers and fetchers

    Logs are the one data source a link-format change cannot hide. OpenAI documents its user agents on its crawlers page: OAI-SearchBot crawls for ChatGPT search results, ChatGPT-User fetches pages when a user’s request triggers it, and GPTBot crawls content that may be used for model training. A rising number of ChatGPT-User fetches to a page is a good hint that it is being used in answers, even when clicks are hard to attribute.

    Make sure your robots.txt allows the search-oriented bots you want to appear in. OpenAI notes that sites opted out of OAI-SearchBot will not be shown in ChatGPT search answers (though they can still appear as navigational links).

    Step 6: Add a self-reported attribution question

    If you have a signup, contact or checkout form, add an optional “How did you hear about us?” field with ChatGPT, Perplexity, Gemini and Copilot as choices. It catches app traffic and untagged clicks that no analytics rule can see. The sample will be small, but it is the only signal you fully control.

    AI referral tracking checklist

    TaskWhereHow often
    Annotate Oct 8–15, 2026 (ChatGPT tagging bug)GA4 / Adobe AnalyticsOnce
    Review AI Assistant channel by source and landing pageGA4 Traffic acquisitionWeekly
    Check Referral channel for unrecognized AI sourcesGA4Monthly
    Update custom AI channel regexGA4 Admin → Channel groupsQuarterly
    Review AI Overviews / AI Mode impressions by pageSearch Console Generative AI reportWeekly
    Mine Opportunity Queries for content gapsBing Webmaster Tools → AI PerformanceMonthly
    Count OAI-SearchBot and ChatGPT-User hits per URLServer or hosting logsMonthly
    Compare Direct vs AI traffic on top AI landing pagesGA4 ExplorationsAfter any big AI product release

    How to turn AI traffic data into better content

    Measurement only matters if it changes what you publish. Pages that already earn AI visits or impressions are your proof of topical authority, so expand them with clear definitions, comparison tables and FAQs, and link them to related posts. Technical explainers such as our GraphRAG vs Vector RAG comparison tend to be cited because they answer a specific question in a structured way. For drafting and auditing that kind of content faster, our ChatGPT prompts for SEO are a practical starting point.

    Finally, compare AI visitors with organic visitors on engagement and conversions, not just volume. Google has said clicks from results pages with AI Overviews tend to be higher quality, and many publishers see AI assistant visitors land deep in the site with a specific intent. Those are the pages worth protecting first.

    FAQ

    Does GA4 track ChatGPT traffic automatically?

    Yes, when the visit carries a recognizable referrer or tag. GA4’s default channel group includes an AI Assistant channel that covers sources like ChatGPT, Gemini, DeepSeek, Copilot and Grok. Visits that arrive with no referrer and no UTM parameters are still counted as Direct.

    Are Google AI Overviews and AI Mode counted as AI Assistant traffic?

    No. GA4 counts AI Overviews and AI Mode clicks as Organic Search, and Search Console includes them in the Web search type of the Performance report. Use Search Console’s Generative AI performance report to see AI Overviews and AI Mode impressions by page.

    Why did my ChatGPT traffic drop in October 2026?

    For most sites it was a tracking problem, not lost demand. From about October 8 to 15, 2026, some ChatGPT links opened without the utm_source tag or a referrer, so visits were recorded as Direct. Industry reports say OpenAI confirmed the bug and rolled out a fix on October 15.

    What regex should I use for an AI channel in GA4?

    Match the source values you actually see, for example .*(chatgpt\.com|openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai).*, place the channel above Referral, and review it quarterly as assistants change domains and link formats.

    Can I see which pages ChatGPT reads?

    Not directly in analytics, but your server logs show requests from OpenAI’s documented user agents. OAI-SearchBot indicates search crawling, while ChatGPT-User indicates fetches triggered by user requests in ChatGPT.

  • GraphRAG vs Vector RAG: Which Retrieval Approach Wins for AI Search in 2026?

    GraphRAG vs Vector RAG: Which Retrieval Approach Wins for AI Search in 2026?

    Short answer: Vector RAG is still the right default for most site owners and content teams. GraphRAG (or hybrid vector-plus-graph retrieval) pulls ahead when answers depend on multi-hop relationships, entity connections, and document structure—exactly the kind of questions that break naive chunk search. In 2026 industry discussion of UK National Innovation Centre for Data (NICD) benchmarking, a graph-enhanced setup was reported at roughly 63 fine-grained truthfulness versus about 35 for vector-only RAG on hard multi-hop questions—an approximate 80% relative lift on that score, with more than double the answer rate on the tested set. Those numbers are useful orientation, not a guarantee for every knowledge base.

    If you are building documentation, product help, internal wikis, or content clusters that feed AI Overviews and chat answers, the retrieval choice shapes how trustworthy those answers feel. This guide compares GraphRAG vs Vector RAG in practical terms for people who own sites and content systems—not as a research paper rewrite.

    What vector RAG actually does (and where it stalls)

    Classic retrieval-augmented generation embeds text chunks into a vector index, retrieves nearest neighbors for a query, and stuffs those passages into the prompt. It is fast to ship, cheap to operate at small scale, and good at “find me the paragraph that sounds like this question.”

    Vector RAG shines when:

    • Questions map cleanly to a single page, FAQ, or section.
    • Your corpus is mostly unstructured prose without dense cross-references.
    • Latency and indexing simplicity matter more than multi-document reasoning.
    • You are prototyping an AI search or support assistant and need a baseline that works this week.

    It stalls when the right answer requires chaining facts: “Which products share a dependency with X and are deprecated after version Y?” Similarity search may return relevant-looking chunks that never connect the entities. The model then fills gaps—hallucinating links or omitting critical constraints. That failure mode is why graph-aware retrieval keeps showing up in AI search and agent design conversations.

    What GraphRAG adds without reinventing your stack

    GraphRAG (used here in the broad industry sense: retrieval that combines semantic search with graph structure) gives the model explicit relationships—sections inside documents, entities linked across pages, hierarchies, citations, product–feature–version edges. The NICD write-up and related workshop material emphasize that even a simple document-structure graph (titles, sections, paragraphs, links)—not only a hand-curated enterprise knowledge graph—can improve complex question answering when paired with vector retrieval.

    According to NICD’s public summary of the work (study title: Reducing Hallucinations in Complex Question Answering using Simple Graph-based Retrieval-Augmented Generation; preprint discussed via arXiv HTML), researchers compared vector-only agentic RAG, vector-plus-graph RAG, and a zero-shot LLM on 510 complex MoNaCo-style questions. Reported highlights widely cited in industry coverage include roughly 80% higher fine-grained truthfulness for the graph-enhanced setup versus vector-only (about 63 vs 35 on their fine-grained score), more than 2× questions answered (on the order of ~29% to ~66% answer rates in summary materials), and improved precision/recall balance—with a modest token cost increase. Treat these as benchmark results under specific models and evaluation choices, not universal product KPIs.

    Better models alone cannot solve reliability. The right evidence, retrieved with the right structure, still decides whether an AI answer is usable in production.

    Practical framing for content and platform teams

    GraphRAG vs Vector RAG: side-by-side for decision makers

    DimensionVector RAGGraphRAG / hybrid
    Best query shapeSingle-hop, topical similarityMulti-hop, entity + structure
    Setup costLow: chunk + embed + indexMedium: graph build/extract + tools
    MaintenanceRe-embed on content changeKeep graph edges in sync with content
    Hallucination risk on hard QsHigher when evidence is fragmentedLower when paths are explicit (in NICD-style tests)
    Token / latency profileOften leanerSlightly heavier; can answer more often
    GEO / AI Overview fitStrong for clear page answersStrong when entity relationships must stay consistent
    When to chooseMost blogs, FAQs, simple docsDocs hubs, policies, catalogs, multi-source KB

    A practical decision framework (site owners and content teams)

    Stay on vector RAG if…

    • Your AI answers mostly paraphrase a single canonical page.
    • You lack clean entity naming or consistent internal linking.
    • Engineering capacity is limited and you need a monitored MVP.
    • Evaluation shows high groundedness already on your real user questions.

    Move toward GraphRAG or hybrid if…

    • Support tickets and search logs show multi-condition questions (“A and B but not C”).
    • Content lives across product docs, changelogs, and policy pages that must be combined.
    • You already maintain a taxonomy, schema, or entity model you can project into a graph.
    • Human review flags omissions and invented relationships more than missing keywords.

    Hybrid is the 2026 default for serious knowledge bases

    Most production systems will not abandon vectors. They will keep semantic recall for “get candidate passages,” then use graph hops to expand, constrain, or order evidence. That pattern matches how the NICD comparison framed vector-plus-graph tools alongside semantic search—not graph instead of embeddings.

    How this maps to GEO and AI Overviews

    Generative Engine Optimization (GEO) is less about tricking a chatbot and more about making extractable, attributable evidence. Retrieval quality inside your own RAG stack and how public AI systems cite the open web share the same fundamentals: clear entities, explicit relationships, and scannable structure.

    If you are building topical authority for AI search visibility, start with the foundations in Google’s Official Guide to AI Search Optimization 2026 and the broader playbook in The Only GEO Guide You’ll Ever Need. Those pillars cover how to write for citation-friendly answers. GraphRAG vs Vector RAG is the systems counterpart: how your site’s knowledge is stored and retrieved when an assistant—yours or someone else’s—needs to combine facts.

    For GEO-minded content teams, retrieval choice shows up as:

    1. Entity clarity: Consistent names for products, APIs, policies, and people reduce graph extraction noise and help AI systems resolve “who/what” mentions.
    2. Relationship-rich linking: Internal links, breadcrumbs, and “related docs” sections are human UX and future graph edges.
    3. Answer-first sections: Direct definitions and decision tables are easier for both vector chunking and section-level graphs to retrieve intact.
    4. Update hygiene: Stale vectors and stale edges both cause confident wrong answers—treat re-index and graph refresh as the same release checklist.

    Content patterns that make either approach work better

    Whichever retrieval stack you choose, publishers control the raw material. AI search systems—and your own RAG pipelines—prefer content that already encodes structure.

    • Definition blocks near the top: One or two sentences that answer the query directly before narrative setup.
    • Comparison tables: Explicit rows for trade-offs reduce multi-hop burden because the relationship is on one page.
    • Versioned facts: Label “as of” dates for APIs, pricing, and policy so the graph and the vector index can age out stale chunks together.
    • Stable anchors: Keep H2 IDs predictable so section-level retrieval and human deep links stay aligned.
    • Authoritative outbound cites: Link primary research (for example NICD or arXiv pages) instead of recycled blog summaries when you reference benchmarks.

    These patterns help vector RAG retrieve cleaner chunks and give GraphRAG higher-quality nodes and edges to walk. They also improve how public generative engines summarize your pages when they do cite you.

    A 30-day pilot plan for teams without a research lab

    You do not need a VLDB workshop paper to learn whether graph tools help your corpus. Run a contained pilot:

    • Week 1: Freeze a 40-question eval set from real tickets or search logs. Score vector-only RAG with human review on groundedness and omissions.
    • Week 2: Build a document-structure graph for one high-value collection (docs + changelog + FAQ). Expose 2–3 graph tools to the same agent.
    • Week 3: Re-run the eval. Keep latency and token logs. Interview two support or content owners on answer usefulness.
    • Week 4: Decide: stay vector, hybrid on that collection only, or expand graph coverage. Document failure classes so the next sprint is not guesswork.

    If the pilot shows weak lift, invest in content structure and chunking before adding graph complexity. If lift concentrates on multi-hop questions, expand graph coverage only for those content types.

    Implementation checklist for a content-fed knowledge base

    Use this as a lightweight rollout plan before you buy another platform.

    1. Inventory question types. Sample 50–100 real queries. Label single-hop vs multi-hop. If multi-hop is rare, optimize vector RAG first.
    2. Normalize entities in content. One canonical name per product/feature; avoid synonym soup in H1s.
    3. Chunk with structure, not only tokens. Prefer section-aware chunks (H2/H3 boundaries) so a document graph can attach cleanly.
    4. Add a minimal graph layer. Document → section → paragraph, plus explicit “depends on / supersedes / related to” edges where authors can maintain them.
    5. Evaluate with refusal-aware scoring. Prefer “I don’t know” over fluent invention. Track groundedness, omission, and multi-hop success separately.
    6. Keep humans in the loop for high-stakes domains. Compliance, medical-adjacent, and financial answers need review paths regardless of retrieval style.
    7. Instrument token and latency cost. Graph hops that double answer rate at ~10% more tokens can still be a win; hops that add cost without lift are not.

    Common myths to ignore

    • “GraphRAG always beats vector RAG.” Not on easy single-hop FAQs. Benchmarks that stress multi-hop will favor graphs; your traffic mix may not.
    • “You need a perfect enterprise knowledge graph first.” Document-structure graphs and light entity links already help in reported studies—start small.
    • “Better prompts replace retrieval upgrades.” Prompts cannot invent missing evidence. They can only rearrange what retrieval provides.
    • “Publishing longer posts fixes AI answers.” Length without entities, structure, and freshness still chunks poorly.

    What “winning” means for AI search in 2026

    For most publishers and product sites, the winner is not a brand name—it is a retrieval policy: vector-first for breadth, graph-assisted for hard questions, continuous evaluation against real user asks. Public AI Overviews and answer engines reward the same clarity you need inside your own RAG: unambiguous entities, stable URLs, and passages that stand alone when cited.

    If you only do one thing after reading this: classify last month’s AI-assistant failures. If they are “wrong neighbor paragraph,” improve chunking and embeddings. If they are “missed a relationship,” pilot a hybrid GraphRAG path on that subset of content first.


    FAQ: GraphRAG vs Vector RAG

    Is GraphRAG replacing vector databases in 2026?

    No. Most serious deployments keep a vector index for semantic recall and add graph tools or graph-expanded context for multi-hop reasoning. Think hybrid, not replacement.

    Do I need Neo4j or a commercial graph DB to benefit?

    Not necessarily for a pilot. Teams start with document-structure graphs and lightweight relationship stores. Choose a managed graph when you need scale, access control, and production tooling—not on day one of an experiment.

    How does this affect on-page SEO and GEO?

    Retrieval architecture does not replace on-page SEO, but content that is entity-clear and well-structured feeds both public AI citation and private RAG quality. Align your writing with GEO best practices while you improve retrieval behind the scenes.

    What should I measure after a GraphRAG pilot?

    Track groundedness, hallucination/omission rates on a fixed question set, answer rate (including refusals), human edit rate, latency, and token cost. Compare against your vector-only baseline on the same questions.

    When is vector RAG “good enough” forever?

    When your corpus and questions stay mostly single-hop, evaluation scores are stable, and business risk from omissions is low. Revisit when you add multi-product workflows, policy crosswalks, or agentic tools that chain steps.


    Related reading on Web Observer: Google’s Official Guide to AI Search Optimization 2026 · The Only GEO Guide You’ll Ever Need

  • Google’s Official Guide to AI Search Optimization: What to Do (and Skip) in 2026

    Google’s Official Guide to AI Search Optimization: What to Do (and Skip) in 2026

    If you want to optimize for Google AI Overviews and other generative AI features in Search, Google’s official answer is blunt: keep doing strong SEO. Retrieval-augmented generation (grounding) and query fan-out still pull from the same Search index and ranking systems. New file formats and “write for the model” tricks do not move the needle on Google.

    This article walks through Google Search Central’s AI optimization guide and the companion docs on AI features, then turns them into a practical checklist. It complements our process-focused playbook, The Only GEO Guide You’ll Ever Need, by anchoring on what Google itself says to do—and what to skip—in 2026.

    SEO still matters for generative AI search

    Google’s guide opens with a direct question: is SEO still relevant for generative AI search? Yes. AI Overviews and AI Mode are rooted in core Search ranking and quality systems. Two techniques explain why classic SEO still applies:

    • Retrieval-augmented generation (RAG / grounding): Google retrieves relevant, up-to-date pages from the Search index, reviews specific information on those pages, then generates a response with prominent, clickable links to supporting sites.
    • Query fan-out: The model issues concurrent related queries to gather more context. A question like “how to fix a lawn full of weeds” can spur fan-outs such as herbicide options, chemical-free removal, and prevention tips—each with its own results set.

    That architecture is why ranking for the searches behind an AI answer still matters. For a hands-on way to map those hidden searches and build pillars around them, use the GEO process in our GEO guide. Google’s framing is simply: optimizing for generative AI search is still optimizing for Search.

    How Google views “AEO” and “GEO”

    You will see “answer engine optimization” (AEO) and “generative engine optimization” (GEO) used across the industry. From Google Search’s perspective, those labels describe the same job as SEO: improve visibility in the search experience people already use. If you evaluate third-party AEO/GEO products, Google advises matching their claims against official guidance—not against invented “AI ranking factors.”

    What Google wants you to do

    1. Create non-commodity, people-first content

    Google says unique, compelling content will likely influence presence in generative AI search more than any other tactic in the guide. Non-commodity pages share traits like:

    • A real point of view — first-hand experience, original data, or expert judgment, not a rehash of what every other page already says.
    • Helpful structure for humans — clear sections and headings so readers (and systems that cite passages) can find the answer quickly.
    • Supporting media when it helps — high-quality images and video following existing image and video SEO practices.
    • Focus on user satisfaction — avoid manufacturing a separate page for every fan-out phrasing; that can tip into scaled content abuse.

    If you use generative AI while drafting, Google still expects the finished work to meet Search Essentials and spam policies. For prompt ideas that support research and editing—without inventing metrics—see Useful ChatGPT Prompts for SEO.

    2. Keep technical crawlability boringly solid

    Eligibility for AI features is not a new checklist. A page must be indexed and eligible to appear in Google Search with a snippet, meeting the technical requirements for Search. Sites must also remain included in Search generative AI features via Search Console controls.

    Practical priorities that still apply:

    • Allow crawling where you want discovery; follow crawl-budget guidance on large, frequently updated sites.
    • Prefer readable structure and semantic HTML for people (including accessibility), without obsessing over “perfect” markup.
    • If you rely on JavaScript, follow JavaScript SEO best practices so important text is available.
    • Improve page experience: mobile-friendly layout, reasonable latency, clear main content.
    • Reduce unnecessary duplicate URLs so crawl and indexing effort go to pages you care about.

    3. Use business and product surfaces when they fit

    Where relevant, keep Merchant Center feeds and Google Business Profile details accurate. Generative responses can surface products and local business information. That is standard Google presence work—not a special “AI schema pack.”

    Myths Google says you can skip

    The mythbusting section of the official guide is the most useful part for teams drowning in AI SEO Twitter advice. Google explicitly says you can ignore these for Google Search:

    llms.txt and other “special” AI files

    llms.txt myth: You do not need new machine-readable files, AI text files, or Markdown formats to appear in Google Search generative AI features. Google Search does not use them for ranking or inclusion. Maintaining llms.txt for other tools is fine; it neither helps nor hurts Google Search visibility.

    “Chunking” content for AI

    There is no requirement to chop pages into tiny fragments so models can understand them. Google systems can handle multiple topics on one page and surface the relevant piece. Page length should serve your audience, not an imagined chunk size.

    Rewriting everything “for AI”

    You do not need a special AI voice or exhaustive long-tail variants. Models understand synonyms and related intent. Writing clearly for people remains the strategy.

    Inauthentic mentions

    AI features can reflect what the web says about products and brands, but chasing fake mentions is not a reliable path. Quality systems and spam defenses still apply. Earn real coverage instead of manufacturing noise.

    Overfocusing on schema for AI Overviews

    Structured data is not required for generative AI search, and there is no special schema.org type you must add for AI Overviews. Keep using structured data for rich results eligibility when it matches visible content—just do not treat it as an AI-Overview switch.

    Measure with Search Console’s Generative AI performance report

    Guesswork is optional. Google rolled out the Generative AI performance report in Search Console to all websites worldwide as of August 31, 2026. Use it to:

    • Track organic impressions from Search generative AI features over time.
    • See which pages earn the most (or fewest) impressions in those features.
    • Break down origin by country and device.

    The report currently covers impressions for AI Overviews and AI Mode (Search Labs experiments are excluded). If you do not see the report, you may lack enough generative AI impressions yet—or your property may be excluded via the Search generative AI control. Google also warns that no third-party tool has access to internal ranking or AI systems; treat external “AI rank” dashboards as workflow helpers, not ground truth.

    Publisher-friendly link updates in AI Overviews (October 2026)

    Visibility is not only about being retrieved—it is also about whether users can click out. In mid-October 2026, Google announced updates intended to make AI Mode and AI Overviews better at connecting people to the open web: more inline links (often higher in responses), testing of a top section that highlights one or two official task-critical links, expanded timely-article carousels (including Preferred Sources), and more clickable designs for related articles and creator context. Coverage from Google’s own Search blog and industry reporting (for example Search Engine Roundtable and Search Engine Land around October 15, 2026) framed the changes as publisher-friendly link surface improvements—not a new optimization loophole.

    Practical takeaway: keep producing citable, crawlable pages worth linking. Link UI can change; eligibility still rests on indexing, quality, and inclusion controls.

    Practical checklist: optimize for Google AI Overviews in 2026

    1. Confirm eligibility: pages indexable with snippets; site included in Search generative AI features in Search Console.
    2. Ship non-commodity pages: original insight, clear answers near the top, honest comparisons and case detail where you have them.
    3. Map a small set of buyer questions and the fan-outs behind them (process detail in the GEO guide)—then win those searches with on-site or off-site pillars.
    4. Fix crawl and experience basics: robots access, internal links, text availability, Core Web Vitals hygiene, low duplicate sprawl.
    5. Skip the myths: no mandatory llms.txt, no forced chunking, no AI-only rewrites, no fake mention campaigns, no “AI schema” panic.
    6. Measure weekly: Generative AI performance report for impressions by page; classic Performance report for clicks and queries; avoid tools that claim secret Google AI metrics.
    7. Refresh winners: update dates and substance on pages that already earn generative AI impressions or classic rankings on fan-out queries.

    FAQ

    Do I need different SEO for AI Overviews than for classic blue links?

    No. Google’s documentation states that foundational SEO best practices remain the path into AI Overviews and AI Mode. There are no additional technical requirements beyond being indexable and snippet-eligible, plus remaining included in generative AI features.

    Is GEO or AEO different from SEO in Google’s view?

    Google treats optimizing for generative AI search as optimizing for Search. GEO/AEO can be useful labels for planning (fan-outs, citations, share of voice), but they are not a separate ranking system Google documents.

    Should I create an llms.txt file for Google?

    Not for Google Search. Official guidance says Google Search ignores these files for visibility. Other ecosystems may use them; that is a separate decision.

    How do I know if AI Overviews are sending me attention?

    Open the Generative AI performance report in Search Console for impressions from AI Overviews and AI Mode. Pair it with standard Performance and Analytics data for clicks and engagement. Lack of report data usually means low generative AI impressions or an exclusion setting.

    Did Google make AI Overviews more publisher-friendly in 2026?

    In October 2026, Google publicly described adding more (and often higher) inline links, testing prominent official-link sections, and expanding news-style carousels in AI experiences. That is industry news about presentation—not a reason to chase new on-page gimmicks.

    Bottom line

    To optimize for Google AI Overviews in 2026, follow Google’s own guide: earn retrieval with people-first, non-commodity content; keep pages crawlable and eligible; ignore llms.txt/chunking/AI-voice myths; and measure with the Generative AI performance report. Use GEO-style fan-out mapping as a planning layer on top of SEO—not as a replacement for it—and keep an eye on how Google surfaces links, because click paths still decide whether “visibility” becomes traffic.

  • The Only GEO Guide You’ll Ever Need

    The Only GEO Guide You’ll Ever Need

    Adapted from Paul Vengeons (@VengeonsP) X Article “the only GEO guide you’ll ever need (thank you opus 5.5)”. Original status: https://x.com/VengeonsP/status/2110725609831719227.

    Cover: dark blue diagram, "1 question, 10 hidden searches". One bubble "best SEO agency in France?" fans out to "best SEO agency France 2026", "SEO Monkey reviews", "agency vs freelance SEO", and "+ 7 more". ChatSEO logo.

    THIS IS THE PROCESS A FRENCH AGENCY WITH 400+ CLIENTS RUNS TO GET CITED BY CHATGPT. everyone pays for a tracker and stares at a visibility score –> they cap it at 10 prompts, read what the AI types behind each one, and rank for that. I’m giving you every step and every prompt

    TLDR:

    • 1. GEO is SEO with one extra map. When ChatGPT doesn’t know, it searches, and it cites what ranks
    • 2. Behind every question you ask an assistant, it runs about 10 hidden searches. Those are called fan-outs, and they are your real keywords
    • 3. Pick 5 to 10 target questions per site. Never 200. Past 10, the work becomes unmanageable
    • 4. Pull the fan-outs once a week, by hand or with a small tool you build yourself. 20 minutes for one site
    • 5. Every fan-out gets a pillar: a page on your site, or a place on someone else’s (PR, links, forums, reviews)
    • 6. The 5 kinds of pages AIs cite most: comparisons, guides, case studies and reviews, forums, media
    • 7. Track a share of voice, not a position. An AI answers with the whole history of the person asking
    • 8. Putting yourself first in your own ranking worked for a while. It doesn’t anymore
    • 9. Give the AIs one identity: same name, address, phone and listings everywhere
    • 10. Be 1st on Google on each fan-out, and the citation follows. Everything else is classic SEO

    I’m giving every step and all 10 prompts away for free ✅

    ChatSEO dashboard in French, Jan 2025–Apr 2026. Clicks 103k, impressions 12.9M, CTR 0.8%, avg position 7.7. Blue and purple lines rise after a marker "Started using ChatSEO.app here" around late June 2025; red arrow points at the later climb.

    To get similar results for your business: try ChatSEO free for 7 days

    This week on MVP, the French SEO podcast I host with Antoine Veyrieres, we did something we rarely do: no guest, just the two of us, and one subject. GEO, the way we actually run it today

    Antoine runs SEO Monkey, an SEO agency with more than 400 clients across France. He sees every kind of site, every kind of niche, and every kind of client who walks in asking for “GEO” because they read about it on LinkedIn

    The week before we recorded, his agency ran an internal workshop to update its GEO process. One of his team wrote the new standard operating procedure. Antoine brought it to the episode and read it to me, line by line

    So this is that process. The agency version, and the version you can run alone on one site with zero budget. Plus my own side of it: what I do differently, what I stopped doing, and the one GEO habit I had for years without knowing it was GEO

    We said it on the episode and I’ll say it again here: we already made several GEO videos. Our practices keep moving. This one is the most up to date, with what works now and the mistakes you should not make

    The episode is in French. The link is at the end

    Last thing: if you want more of these, a like, a quote or a bookmark is what keeps them coming 🙏

    Little tip: bookmark this. You’ll come back to it

    Infographic: "One question to ChatGPT, a whole page of hidden searches" for "best SEO agency in France?". Fan-out 1: best SEO agency France 2026 (an English ranking). Fan-out 2: SEO Monkey agency reviews. Fan-out 3: SEO agency vs freelance SEO. Note: about 10 per question. Source: Antoine Veyrieres (SEO Monkey) and Paul Vengeons on MVP, October 2026.

    GEO is SEO with one extra map

    Let me start with the sentence that will save you the most money

    Antoine said it at the end of the episode, and it’s what he tells every client who asks: SEO and GEO are the same thing. When a client walks in saying “I want GEO”, he says cool, let’s do GEO, it’s called SEO. When a client walks in saying “I want SEO”, he says yes, and you’ll get GEO with it

    That’s not a slogan. It’s how the assistants work

    When ChatGPT, Claude, Gemini or Perplexity doesn’t know the answer, it searches. It types queries into a search engine, reads what ranks, and quotes it. Google said it itself in its own guide to AI features: the AI answers run on the classic index, through query fan-out

    So if you have no SEO, the model has nothing to find. That’s why I never sell GEO as a separate discipline you start after SEO. It sits on top of SEO. Rank first, and the citations come

    But there IS one difference, and that’s the whole subject of this article

    In classic SEO, you have a target keyword. You rank for it. Job done

    In GEO, your target is a question. And behind that question, the AI runs a whole set of searches you never see. You don’t rank for the question. You rank for what the AI searches

    -> GEO is not a new discipline. It’s SEO on keywords you didn’t know you had

    What a fan-out is (and why it’s your real keyword)

    Antoine’s first point, and the one his whole process is built on: map your fan-outs

    A fan-out is a sub-search. When you type a question into ChatGPT, it doesn’t search for your question. It breaks it into several smaller searches, runs them, reads the results, and builds its answer from them

    He gave the example from his own world. Someone asks ChatGPT: “what is the best SEO agency in France?”

    Here’s the kind of thing the assistant actually searches before answering:

    • “best SEO agency France 2026”, in English. It goes and reads an English-language ranking, even for a French question
    • “SEO Monkey agency reviews”. It decided to check the reviews of two or three agencies, so it searched for them by name
    • “SEO agency vs freelance SEO”. It wants to compare the two options before recommending one

    Each of those is a fan-out. Each of those is a search with a results page. And each of those results pages is something you can rank on, or get yourself mentioned on

    Antoine’s point is that the scraping goes further than what you’d expect. The model also pulls results you could never rank on yourself, like Wikipedia-type pages, because it wants authority sources. You won’t beat Wikipedia. But you can work every fan-out where a normal page has a chance

    And here’s the part that makes it a process instead of a one-off: the fan-outs change. From one month to the next, the same question can trigger different searches. So you pull them regularly, not once

    -> The question is the goal. The fan-outs are the keywords. You rank on the keywords

    Step 1: pick 5 to 10 target questions. Never 200

    This is the rule I liked most, and it’s the one most people break

    Antoine’s agency caps every client at 5 to 10 target questions. Maximum. Above that, he says, it becomes completely unmanageable as an objective

    At first that sounds tiny. In SEO you’d track hundreds of keywords. But think about what one question really is: each one breaks into about 10 fan-outs. So 10 questions is already around 100 searches to work on. That’s a lot of work for one site

    I asked him for a random business to test it live. He picked a carpenter, the kind who builds custom beds

    What questions does a carpenter really need to show up on? “Who is the best carpenter in my city?” “How much does a custom bed cost?” Maybe one more about his specialty. That’s it. Very few. And that’s true of almost every business

    For his own agency it’s “what is the best SEO agency”, “what is the best GEO agency”, and a couple of long-tail ones. For me with ChatSEO, it’s questions like “what is the best SEO tool”. Very fast, very efficient

    It’s the 20/80 applied to GEO. In classic SEO you still worked plenty of long-tail keywords. In GEO, one question already hides the long tail inside its fan-outs, so you need fewer questions, not more

    My own version is even smaller: on my own sites, I track 3 to 5 real prompts by hand. The ones a real buyer would type. Not the 300 synthetic prompts a tracking tool invents to fill a dashboard

    Here’s the prompt I’d use to pick them:

    You are my GEO strategist. My business: [WHAT I SELL, TO WHOM, WHERE]
    
    List the questions a real buyer would type into ChatGPT or Claude right before choosing a provider like me. Only questions with buying intent:
    - "best [service/product] for [need]" and "best [service] in [city]"
    - price questions ("how much does [service] cost")
    - comparisons ("[option A] vs [option B]", "[competitor] alternative")
    - review questions ("[competitor] reviews")
    
    Rules:
    - Write them the way a person types them, not like keywords
    - No informational questions ("what is [topic]")
    - Rank them by how close the person is to paying
    - Give me 15, then tell me which 5 to 10 you would keep and why
    - Do not invent search volumes. If you don't know, say so
    

    -> Ten questions is not a small target. It’s around a hundred searches. Choose them like they cost money

    Step 2: pull the fan-outs (by hand, for free)

    Now you need to see what the AI actually searches for each question

    The free way, which is how Antoine says anyone can do it: go to any assistant, type your target question, and watch the small bubble that appears while it searches. Click it. You can read the path it took: what it searched, which pages it opened

    In ChatGPT, Claude and the others, that search step is visible right in the conversation. Copy every sub-search. That’s your list of fan-outs for that question

    Then you decline it into a roadmap. One line per fan-out, under its question

    A few things I’d add from my own testing:

    • Use the assistant your buyers use. Antoine’s agency uses Claude for its own work, but runs the analysis on ChatGPT, because more people use ChatGPT. Track where your buyers are, not where you are
    • Use a clean session. Your own history colors the answer. More on that in the share of voice section
    • Run each question more than once. The same question doesn’t always trigger the same searches. What comes back every time is what matters

    There’s also a source most people ignore, and it’s free: the AI Performance report in Bing Webmaster Tools. It shows when your site is cited in Microsoft’s AI answers, and the grounding queries the AI actually typed to find you. That’s real fan-out data, from the engine itself. I trust it more than any score a third-party tool sells

    Here’s the prompt to clean what you copied into a usable list:

    Here is what an AI assistant searched before answering the question "[TARGET QUESTION]". I copied it from the search step, across [N] runs:
    
    [PASTE EVERY SUB-SEARCH, ONE PER LINE, WITH THE RUN NUMBER]
    
    Do this:
    1. Merge the duplicates and near-duplicates (same intent, different words)
    2. For each fan-out, count in how many runs it appeared
    3. Sort by that count, most frequent first
    4. Next to each, write the intent: comparison, review, price, ranking/list, guide, or other
    5. Flag the fan-outs in another language than the question
    6. Do not add any fan-out I did not paste

    -> The search step is printed on the screen. Most people never click it

    How to read a fan-out list (the 4 patterns)

    The first time you copy the searches out of the search step, the list looks like noise. After a few questions, you start seeing the same four shapes come back. Each one tells you something different about what to build

    1. The language switch. Antoine’s example had it: a French question, and the assistant goes and reads an English ranking. It happens a lot on “best” questions, because the English web has more lists. If your market is French and the fan-out is in English, you have two options: get into the English lists that already rank, or make sure the French version of that page exists and is better. Don’t ignore it because “my clients don’t speak English”. The model does

    2. The brand check. “[brand] reviews”, “[brand] opinions”, “[brand] scam”. The assistant has already shortlisted a few names and goes to verify them. If yours is in that search, congratulations, you’re on the shortlist. Now the question is what it reads when it checks you. That’s the reviews and identity work from Step 9

    3. The comparison. “[option A] vs [option B]”, “agency vs freelance”, “[tool] alternative”. The assistant is building a table in its head. The page it reads is usually a comparison that already ranks. That’s comparison content, type 1 from the list above, on your site when you can be honest about it, on other sites otherwise

    4. The freshness signal. A year in the search (“2026”), “latest”, “updated”. The assistant wants recent sources. A page with an old date, or no date at all, loses this one even if it’s better. Put the date on the page, update it for real, and put the year in the title when the page really is current

    When a fan-out doesn’t fit any of these, it’s usually a definition or a how-to. Those are guide territory. One good guide catches many of them at once

    -> Four shapes come back on almost every question. Once you see them, the roadmap writes itself

    Step 3: do it every week (20 minutes for one site)

    Fan-outs move. That’s why Antoine runs this weekly

    His agency has an internal tool for it. They call it LLM Tracker. It’s not for sale, it’s a business tool built for their own clients. What it does is simple to describe: for each client it holds the 10 target questions, and every week a small robot goes to ChatGPT, types the 10 questions, updates the fan-outs, and gives a score of how often the client appears

    The score reads like this: “you appear one time out of three on ‘what is the best SEO agency in France’”. And it breaks that down on every fan-out too. Then the editorial plan follows from it

    But he was very clear on the episode: you don’t need the tool. They built it because they manage a lot of projects. For one site, his number is this: once a week, take 20 minutes, run your 10 target questions, update your fan-outs, update your scores, and adjust your editorial plan

    And the reassuring part: after a few weeks, the fan-outs settle. It’s the same ones that keep coming back. The weekly check becomes fast because most of it doesn’t change

    Infographic: "The weekly GEO routine, 20 minutes for one site". Six steps: 1 ask 5–10 questions, 2 log the fan-outs, 3 score each question, 4 check Google on each fan-out, 5 give new ones a pillar, 6 change nothing else. Source: Antoine Veyrieres and Paul Vengeons, MVP, October 2026.

    Here’s a prompt that turns your weekly notes into the scorecard:

    You are my GEO tracker. Here are this week's runs for my site [DOMAIN].
    
    For each target question, I ran it [N] times in [ASSISTANT] from a clean session. For each run I noted: was my site cited (yes/no), which sites were cited, and the sub-searches shown.
    
    [PASTE THE RAW NOTES]
    
    Here is last week's scorecard:
    [PASTE IT, OR "none"]
    
    Give me:
    1. A table: question, times cited / runs, change vs last week
    2. The fan-outs that are NEW this week, and the ones that disappeared
    3. The sites cited most often instead of me, with how many times
    4. The 3 actions for this week, ranked by how many questions they help
    Keep every number exactly as in my notes. Do not estimate anything I did not count

    -> Twenty minutes, once a week, on the same 10 questions. That’s the whole tracking budget

    Why I would never start with a paid GEO tracker

    On the episode I gave my ranking of the three ways to track this, and I’ll give it to you the same way

    For someone who is starting, with not much budget, who wants to do it well: the worst option is paying for an external tracking tool. It’s expensive, and in my opinion those tools have biases. They test prompts nobody really types, then sell you a visibility score built on them

    The two options I like:

    • By hand: the 20 minutes a week above. Free, and you see the real answers with your own eyes
    • A small internal tool: if it’s something you need regularly, build it yourself with Claude. It doesn’t take long anymore

    And if you have a real budget, several employees, cash in the bank: sure, look at the external tools, there are several (Profound is the best known). If their only product is doing this, you should expect it to be more precise than what you’ll build in an afternoon. That’s logical

    But for small sites, and honestly even for good-sized companies, build your own process. You’ll save money

    This is also why ChatSEO doesn’t sell a visibility score. On purpose. The real data is free, and the rest is a score on prompts nobody typed

    -> A visibility score on invented prompts is a nice chart. Ten real questions a week is a strategy

    Build your own tracker with Opus 5.5 (an afternoon)

    Here’s where the title comes from

    On the episode I went on a little tangent, because I was genuinely shocked that week. I test my AI processes on different models all the time. I had a long period on Claude (Opus 4.5, 4.6, 5), then the ChatGPT Astra hype, so I tested that. Astra is strong, but the models below it weren’t great for me

    Then I came back to Claude and now I do everything with Opus. And right now, Opus takes control of my computer and does things for me. Not with a special product. It just drives my machine with Python. It browses websites. It fills in forms. Things where I used to have to check every step, it now does fast, and right the first time

    So when Antoine described his weekly robot, my reaction was: anyone can build this now. If tracking your questions is something you’ll do every week, have Opus build you the small tool. I haven’t built mine yet. But if I wanted to follow this seriously, that’s exactly what I’d do

    Here’s the brief I’d give it. Adapt it: what’s possible depends on the assistant you track and what its own terms allow

    Build me a small weekly GEO tracker for my site [DOMAIN]. Keep it simple: one script, one CSV, nothing to host.
    
    Input: a file questions.txt with my 5 to 10 target questions
    
    Each week, for each question, [N] times:
    - Ask it to [ASSISTANT], with web search on, through its official API, from a clean context (no memory, no history)
    - Save: the date, the question, the run number, whether [DOMAIN] or my brand "[BRAND]" is cited, every cited URL, and every search the assistant ran if the API returns them
    
    Output:
    - results.csv, appended each week (never overwritten)
    - a short weekly.md: share of voice per question (cited runs / total runs), change vs last week, new and lost fan-outs, top 5 domains cited instead of me
    
    Rules:
    - Before writing code, tell me what the API really returns about searches and citations, and what it does not
    - Never fake a field the API does not return: leave it empty and say so
    - Add a dry-run mode that costs nothing, and print the cost of a real run before it starts
    

    -> The tool Antoine’s agency built is now an afternoon with a good model. The method is what matters, not the software

    Step 4: give every fan-out a pillar

    This is where GEO stops looking like SEO on paper, and it’s Antoine’s most useful change

    In a classic semantic roadmap, every line is a page you write on your own site. In his GEO roadmap, every fan-out gets a “pillar” column, and the pillar can be anything SEO already knows how to do: content on your site, technical, links, digital PR, forums, reviews

    His two examples:

    • The question is “what is the best SEO agency”. One fan-out is “SEO agency ranking 2025”. A ranking is not something you publish about yourself. So that fan-out goes to the off-site pillar: digital PR or link building, to get into the rankings that already exist
    • Another fan-out is “case study + client name + brand name”. That one makes total sense on your own site. You publish the case study of a client who uses your service. So it goes on-site
    Table infographic: "The GEO roadmap is an SEO roadmap with one more column". Rows: SEO agency ranking 2026 = Off-site (get into lists); [client] case study + [brand] = On-site; SEO agency vs freelance = On-site comparison; [brand] reviews = Off-site (GBP, Trustpilot).

    And the 20/80 doesn’t change: most of the work is still semantic content on your site, plus off-site semantics, meaning links and PR. Antoine’s rule of thumb: when a fan-out can be won on your own site, don’t overthink it, win it on your site. On-site is so fast and so effective when it’s done well

    So the roadmap is one question, about ten fan-outs, and for each one an operational choice: create content on your site, digital PR, a forum, social media, links

    Here’s the prompt that builds it:

    You are my GEO roadmap planner. Site: [DOMAIN]. Business: [ONE LINE]
    
    Target question: "[QUESTION]"
    Its fan-outs (from my tracking, most frequent first):
    [PASTE THE LIST]
    
    For each fan-out, give one line:
    - The fan-out
    - The pillar: ON-SITE (a page on my site) or OFF-SITE (PR, link, forum, review platform, social)
    - Why: what kind of page ranks on it today, and whether a page of mine could realistically be one of them
    - The exact action: which page to create or update on my site, or which kind of third-party site to get on
    - Effort: S, M or L
    
    Rules:
    - If a fan-out is a ranking or a "best" list, never propose that I publish my own list with me first. Propose getting into other people's lists
    - If it's a review query, point to the review platforms, not to a page I write about myself
    - Prefer ON-SITE when a normal page can win it
    

    -> One extra column turns an SEO roadmap into a GEO roadmap. Nothing else changes

    Second ChatSEO Search Console-style chart, Jan 2025–Apr 2026. Clicks 9,130, impressions 286k, CTR 3.2%, avg position 8.7. Flat until early 2026, then a sharp rise; red arrow and label "Started using ChatSEO.app".

    To get similar results for your business: try ChatSEO free for 7 days

    The 5 kinds of pages AI assistants cite most

    I asked Antoine which fan-outs come back the most across his 400+ clients. Which kinds of pages get scraped and quoted

    He gave me a ranked list. Here it is, in his order

    List infographic: "The 5 kinds of pages AI assistants cite most". 1 Comparisons (on-site or off-site), 2 Guides (on-site), 3 Case studies & reviews (on-site + review platforms), 4 Forums & social (off-site), 5 Media (off-site).

    1. Comparisons. The “best + my need” queries. Not “SEO agency” anymore, but “best SEO agency for X”, “best product for this need”. These are the most commercial ones, so they come first

    2. Guides. Informational content comes back a lot, through guides. A guide gets cited on a lot of different fan-outs, because it covers many semantic branches. A sales page is cited on its one target query. A great guide, published regularly, is very well scraped by the AIs. That’s exactly why you’re reading one

    3. Case studies and reviews. Everything around “reviews + brand” and your past work. It reinforces your authority. It’s your reputation, read by a machine

    4. Forums and social networks. Every site where different user accounts interact on the subject of the fan-out. Reddit-style threads, discussions, comments

    5. Media. Everything linked to digital PR and link building

    So, his summary: 5 to 10 global questions maximum, and 5 kinds of content you can do on your site or off it

    My only addition, from my own GEO doctrine: AIs quote passages, not pages. A direct answer in the first lines, a numbered list, a table of facts someone can check. If your comparison page buries the answer in paragraph eight, the model takes someone else’s

    -> Comparisons, guides, reviews, forums, media. If a fan-out doesn’t fit one of the five, it probably isn’t worth your week

    Step 5: write pages that answer every branch

    Antoine had the SOP in front of him and read me what it says about content, whether it’s on your site or on someone else’s

    The rule: map the demand, and cover the maximum of questions a buyer can ask, on each page

    He described it as a tree of branches. For a buyer, there are:

    • The objections: “it’s too expensive”, “I can do it myself”
    • The doubts: “does it really work for a business like mine?”
    • The fears: “what if it breaks something?”, “what if I’m locked in?”
    • The why: why use this at all, why now
    • The sources: where the claims come from
    • The dates: when it was true, when it was updated

    The point is to have content with a lot of internal structure, silos inside your own page, so it can be picked up by the maximum number of fan-outs. One page, many branches, many chances to be the passage the AI quotes

    This is not keyword stuffing. Each branch is a real question a real buyer asks before paying. If you answer them all, the human stays and the model has something to quote

    Here’s the prompt I’d use before writing or updating a page:

    You are my content strategist for GEO. Page: [URL or "new page"]. Main question it must win: "[QUESTION]"
    
    Fan-outs this page should also answer:
    [PASTE THE ON-SITE FAN-OUTS FROM THE ROADMAP]
    
    1. List every question a buyer asks before choosing, grouped by branch: objections, doubts, fears, why (use it / now), proof and sources, dates and updates
    2. For each, say if the current page answers it: yes, partly, no (quote the passage if yes)
    3. For each "no" or "partly", write the answer as a self-contained passage of 40 to 80 words: the answer first, then the fact or the source behind it
    4. Propose the section order: the direct answer at the top, then the branches in the order a buyer worries about them
    5. Mark every claim that needs a real number or a real example I must provide. Never invent one

    -> One page, every branch. The AI quotes the passage that answers, not the page that ranks

    Step 6: never put yourself first in your own ranking

    On the episode I did the recap of what really differed between GEO and pure SEO since the beginning. It’s a short list

    First difference: targeting GEO keywords. The “best X” queries. Those weren’t keywords most of us targeted in SEO before. Affiliate sites always did (“best cordless drill”), but service businesses mostly didn’t. That one stayed. It still matters

    Second difference: putting yourself first in your own rankings. You publish “the 10 best [your category]”, you put yourself number one, ChatGPT reads it and repeats it. That worked for a while. It doesn’t work anymore. So that one is gone

    I taught that tactic myself, in videos, until the middle of 2026. I stopped, and I had Claude remove the self-rankings from my own sites. The assistants caught on: they now tend to cite the second and third of a list rather than the author who put himself first

    So the only thing left is the first one, done differently: you target the GEO keywords, but you don’t really target them with your own site. You target them with OTHER sites that put you first in THEIR rankings, if possible

    That’s honestly all you have to remember. That’s GEO. Everything else is classic SEO

    What it means in practice:

    • Get into other people’s lists. The “best X” articles that already rank and already get cited. That’s the off-site pillar from Step 4
    • If you publish a list yourself, rank by truth. Put the real leaders in. Say who each one is for. If you include yourself, disclose it, and don’t take first place. A list where you’re first and everyone else is bad convinces nobody
    • Sell yourself on the pages made for it: “[your brand] vs [competitor]” and “[competitor] alternative” pages are where your own site can honestly win

    -> The trick that worked was being first in your own list. What works now is being first in someone else’s

    Step 7: track a share of voice, not a position

    Antoine had a slide on how to measure visibility, and it’s the part that changes the most habits

    In SEO, you track a position. Am I 1st, 2nd, 10th, 20th?

    In GEO, that doesn’t make sense. An AI doesn’t only have your question. It has the whole history of the person asking. It knows if they live in France, in Paris, in Lille, what they asked last week, what they need. So a position means nothing: the same question gives a different answer to every person

    What you track instead is a share of voice: your percentage of appearance across many simulated searches. “Cited in one run out of three”, not “ranked 3rd”

    Comparison graphic: "Stop asking what position am I. Ask how often you show up". Left, position (SEO habit): rank changes with user history, one check. Right, share of voice (GEO): cited in 1 run out of 3, same 5–10 questions weekly, sessions that look like the buyer.

    And here’s the subtle part. His agency gives its tracking sessions a history, so the simulated searchers look like the client’s real buyers. He calls it building the persona

    His example: you sell dog grooming. Your buyers are a bit of everyone, but on average maybe a bit older, with more budget. The little grandma who takes her poodle to the groomer. Your tracking has to run as people who look like her, not like you

    Because if only people like me run the searches, the results will all look the same. Me, and probably everyone who listens to our podcast, will get very similar answers. Run the same search on your mother’s phone, or your grandmother’s, and you may see something different. Especially on broader questions than “best SEO tool 2026”, which is ultra-niche

    At agency scale they build that into a global knowledge base for the tracking. On your own, you can do a lighter version:

    You are helping me track my share of voice in AI answers, for my site [DOMAIN].
    
    My real buyer: [AGE RANGE, CITY OR COUNTRY, JOB OR SITUATION, BUDGET, WHAT THEY USUALLY ASK]
    
    1. Write 3 short "buyer profiles" that match this person. For each: 3 or 4 everyday questions they would plausibly have asked an assistant in the past weeks, unrelated to my business
    2. Write how each profile would phrase my target question "[QUESTION]" in their own words
    3. Tell me how to run each profile in a clean session: open a new chat with no memory, ask the 3 or 4 everyday questions first, then the target question in their words
    4. Give me the table to fill: profile, run, cited yes/no, who was cited, sub-searches shown
    5. Remind me that this is a share of voice: the result is "cited X times out of Y runs", never a rank

    -> You don’t rank in an AI answer. You show up, or you don’t, a certain share of the time

    Step 8: audit the sources that get cited

    The next point on Antoine’s slide: the cited sources

    For each target question, his tracking keeps a ranking of the domains that get cited, site by site. Over the weeks you see a history: to appear on “best SEO tools in 2026”, it’s always the same few sites the AI reads

    Sometimes it’s a small site. A little digital media cited three times on that question. That’s gold: it becomes a site to contact, for digital PR or a link, so you appear on that fan-out

    His comparison is the one that made it click for me. In link building, you look at the link profile of whoever is first on the Google results page, and you know what you need. It’s the same for an AI results page. If every time someone asks “best SEO agency in France”, the same source comes back first in the citations, you absolutely have to get in touch with it. Create your page there, get mentioned, build the relationship

    There’s a notion of authority. But there’s also a notion of trust. You audit the answers and you notice: this small site gets cited a lot. Interesting. Go there

    Using ChatSEO, for my site [DOMAIN]:
    
    Here are the domains cited in AI answers to my target questions over the last [N] weeks, with how many times each was cited:
    [PASTE: question, domain, times cited]
    
    1. Group them by type: media, list/ranking article, review platform, forum, competitor, other
    2. For each domain cited 2+ times, read the live Google results for the fan-outs where it appears and tell me if it also ranks there, and on which page
    3. Find the exact page that gets cited, and whether my brand is mentioned on it
    4. Rank the outreach targets: most cited first, then the easiest to get on (lists that accept additions, review platforms, threads that allow comments)
    5. For the top 5, write the angle: why their reader would want my brand on that page. No generic pitch

    -> Look at who the AI reads, the way you’d look at the link profile of the #1. Then go be on that page

    Third ChatSEO chart, Feb 2025–Apr 2026. Clicks 11.7k, impressions 238k, CTR 4.9%, avg position 12. Cyan arrow "Started using ChatSEO.app right here" near Sept 2025; red arrow marks the later upward trend in clicks and impressions.

    To get similar results for your business: try ChatSEO free for 7 days

    Step 9: give the AIs one identity

    The last item on the slide was NAP consistency, which Antoine rephrased better: give the AIs one single identity

    The idea is trust. You want the maximum of brand mentions, brand citations, on your site and on other sites, all telling the same story. Concretely:

    • Your name, address and phone the same everywhere, on your site and in every listing
    • Links from your site to your social accounts, and the social accounts actually existing and alive
    • A legal notice page, the boring one, because it states who you are
    • Your listings: Google Maps, Trustpilot, the review sites of your industry
    • Mentions of your brand on other sites, linked or not

    All of that is taken into account, fully, in GEO. An assistant that has to recommend a business wants to be sure the business is real and is what it says it is

    You are my brand consistency auditor. Brand: [BRAND]. Site: [DOMAIN]. Official name, address, phone: [EXACT NAP]
    
    1. List every place my brand appears that I give you below, and check that the name, address, phone and description match the official ones exactly:
    [PASTE: my site footer and legal notice, Google Business Profile, Trustpilot, social bios, directory listings]
    2. Flag every mismatch, even small (abbreviations, old address, old phone, different category)
    3. Check that my site links to each social account, and that each account links back
    4. List the review platforms of my industry where I have no listing yet
    5. Give me the fix list in order: biggest trust gap first

    -> An AI recommends a business it can verify. Make yourself easy to verify

    Step 10: check your Google position on every fan-out

    This is the step that closes the loop, and it’s the last sentence of Antoine’s summary: for each fan-out, you track your position on Google

    Why Google, when the target is ChatGPT? Because the assistant searches, and it reads what ranks. For ChatGPT, Claude and the others, the search runs on a classic engine. If you’re on page 3 for a fan-out, the model will almost never read you on it. If you’re 1st, the odds flip

    So every fan-out on your roadmap gets two numbers next to it, every week:

    • Your share of voice on the question it belongs to (Step 7)
    • Your Google position on the fan-out itself

    When the Google position goes up and the share of voice follows a few weeks later, you know the plan works. When the share of voice is stuck while you’re already 1st on Google, look off-site: the AI is reading someone else’s list, someone else’s review page, someone else’s forum thread. That’s Step 8

    Here’s the prompt I’d run for that column:

    Using ChatSEO, for my site [DOMAIN]:
    
    Here are the fan-outs from my GEO roadmap, grouped by target question:
    [PASTE THE ROADMAP: question, fan-out, pillar]
    
    For each fan-out:
    1. Read the live Google results in [COUNTRY], [LANGUAGE]
    2. Give my best ranking URL and its position, or "not in top 20"
    3. Give the top 3 URLs and what kind of page each one is (list, guide, review, forum, media, competitor page)
    4. If the pillar is ON-SITE: tell me which of my pages should rank there, and the one change most likely to move it up
    5. If the pillar is OFF-SITE: tell me which of the top 3 pages I should try to be mentioned on
    Never estimate a position: if you can't read it live, say so

    -> The AI cites what ranks. Your Google position on each fan-out is the leading indicator of your share of voice

    The architect, the three accesses and the three bottles of wine

    Right after the sponsor break, I told a story on the episode that has everything in it: local, Claude, ChatSEO, and a developer who probably hates me now

    My landlord here in Budapest is Hungarian. Every time he comes to collect the rent, we talk business for 10 or 20 minutes. Every time, I show him how ChatSEO is growing. So he understood that it works, and that I do SEO. Around the third or fourth visit, he asked me: honestly, what would you do with my site?

    He’s an architect. He designs custom projects, beautiful houses. His site was the kind Antoine knows well: four pages max, pure branding, nothing that targets a search

    So I put his site into ChatSEO. We saw interesting things. And I wired everything with the ChatSEO MCP and Claude, on his site

    To change everything, I needed three accesses. His blog ran on a CMS (I believe it was Sanity). His Cloudflare, for the HTTP to HTTPS redirects. And his GitHub, because the rest of the site was static

    The developer gave me access each time, but never the real one. Editor rights, not admin. Each time I had to push to get the actual access. And once I had it, everything was integrated in two seconds

    I did it all in one afternoon. Pages on real Hungarian business keywords. His Google Business Profile, created and already validated

    And here’s the detail I told Antoine about. When I created the listing, I put a keyword straight into the name: his company name plus something like “architect Budapest”. I brainstormed it with Claude first: put the normal name and edit it later, or put the keyword directly? Its answer was that the chances of acceptance were higher if I put it directly, because a later edit can trigger a review. So I did. And it went through

    Honest note, because I don’t want you to copy the risky part blindly: Google’s rules say the listing name should be the real business name, and keyword stuffing in names can get a listing suspended. I took the risk because his listing didn’t exist before. There was nothing to lose. On a listing with years of reviews, I wouldn’t

    That same evening, my landlord came back. He had wanted to pay me at first. I told him no, I’m focused on ChatSEO, I don’t take client work anymore, but the 20/80 for him I can do fast. So he brought me three bottles of good wine

    -> One afternoon, three accesses, a site that finally targets searches. The hardest part was getting the admin rights

    The GEO habit I had for years without knowing it

    Funny fact I realized live on the episode

    For fun, I relaunched an affiliate site. It takes me almost no time, because Opus 5.5 does the work while I do other things. I can tell it “take every page of my site, add CTAs, fix this”, go do something else, barely check, and know it’s done right the first time

    And a lead came in from ChatGPT. On a site where I never did any GEO

    Then I remembered: I have a habit. Whenever I can, I put “best” in the title. Even if the keyword is “cheap cordless drill”, the title becomes something like “Cheap cordless drill: the best one to buy”. Once the main keyword is placed, adding “best” costs nothing, and it potentially adds a lot of GEO queries

    That’s exactly the first difference from Step 6: the “best X” queries. I’d been targeting them by reflex for years

    My own rule on titles, for both Google and AI: the title is the strongest on-page element you have. Put the main keyword first, then the words that catch the evaluation queries: “best”, the year, “price”, “review”, “alternative”. The year in the title is a cheat code

    Using ChatSEO, for my site [DOMAIN]:
    
    Take my pages that target a commercial query (product, service, comparison, category). For each:
    1. The current title, and the main query the page gets clicks for in Search Console
    2. A new title: the main query first, then the evaluation words that fit honestly ("best", the year, "price", "review", "vs", "alternative"), under 60 characters
    3. Only propose "best" or a year if the page really compares options or is really up to date
    4. Never change a page that already ranks in the top 3 for its main query: list those separately
    5. Give me the old and new title side by side, and the query each one now covers

    -> “Best” in the title was GEO before anyone called it GEO

    What clients actually ask for

    I wanted Antoine’s read on the market, because he talks to more clients than I do

    His answer was honest, and a bit old school, in the good sense. He’s been doing SEO for years. He refuses to oversell GEO as “invest massively, it’s do or die”. When people ask for GEO, he does GEO, which is SEO. When people ask for SEO, he tells them they’ll need GEO too, and it’s the same work

    What changed is the demand. Everyone is alert on the subject. Everyone understands that more and more traffic comes from the AIs. So demand keeps rising

    But for him it isn’t a new demand. People have a budget to get traffic. Sometimes they call it GEO, sometimes SEO, sometimes ads. And to rank in the AIs you do what the web always required: create content, develop sites, get other sites to talk about you. A good SEO trained for years will be good at GEO. It’s not a different job

    He also gave a business idea for the agencies and freelancers reading: if you were more sales-driven, you could build a small database and run GEO workshops, or small events exclusively on GEO. It’s a way to get leads, because everyone wants to understand it right now

    -> The demand is new. The work isn’t. Sell it honestly and you keep the client after the hype

    The whole process on one small business (the carpenter)

    Let me put every step together on Antoine’s random example, so you can see what a week of this really looks like. Everything below is a worked example, not a client. Your numbers will be your own

    The business. A carpenter in one city who builds custom beds and furniture. Small site, five pages, no blog

    Step 1, the questions. Three are enough: “best carpenter in [city]”, “how much does a custom bed cost”, “custom furniture or flat pack, which is better”. That’s it. Three questions, roughly thirty searches behind them

    Step 2, the fan-outs. He asks each question three times and copies the searches. He’ll typically see a local list (“best carpenters [city]”), a price search (“custom bed price per square meter”), a review check on two or three names, a comparison (“custom bed vs IKEA bed”), maybe a forum thread

    Step 3, the habit. Every Monday, 20 minutes. After a month, most of the fan-outs stop changing

    Step 4, the pillars. The price search is on-site: a real price page, with ranges and what drives the cost. The local list is off-site: the existing “best carpenters in [city]” articles, the local directories. The comparison is on-site: an honest “custom vs flat pack” page that says when flat pack is the better choice

    Step 5, the branches. The price page answers the fears (“what if it doesn’t fit my room”), the doubts (“how long does it take”), the why (“why not buy one”), with dates and real photos

    Step 6, no self-ranking. He doesn’t write “the 10 best carpenters in [city]” with himself first. He asks the local site that already wrote one to have a look at his work

    Step 7, share of voice. He runs his three questions as a buyer who looks like his real clients, from a clean session. He notes “cited 1 out of 3” or “not cited”

    Step 8, the sources. He notices the same local blog cited on two of his three questions. That’s his first email

    Step 9, identity. Same name, address and phone on his site, his Google Business Profile, his directory listings. Photos on the listing. Reviews asked for after each delivery

    Step 10, Google. He checks his position on the price search and the comparison every week. When those go up, the citations follow

    That’s a complete GEO plan for a five-page site. No tracker, no budget, a few pages and a few emails

    -> Small business, small plan. GEO doesn’t need scale, it needs the right ten questions

    The 9 mistakes that kill a GEO plan

    • Tracking 200 prompts. Past 10 questions it’s unmanageable, and a tool’s synthetic prompts aren’t what buyers type
    • Paying for a tracker before you’ve done it by hand once. You won’t know what the score means
    • Working the question instead of the fan-outs. You can’t rank for a question. You rank for what the AI searches
    • Checking once. Fan-outs move from month to month. Weekly until they settle
    • Ranking yourself first in your own list. It used to work. Now it gets you skipped
    • Tracking a position. Every answer depends on the person asking. Track how often you appear
    • Ignoring the fan-outs in another language. The assistant reads English lists for French questions. If you’re not on them, a competitor is
    • Never looking at who gets cited. The small site quoted three times on your question is the cheapest win you have, and most people never open the sources
    • Treating GEO as separate from SEO. No rankings on Google, nothing for the AI to find. Roughly one action in ten is GEO. The other nine are SEO

    What this does not prove

    I want to be straight about the limits

    • The 400+ clients are Antoine’s agency. The process comes from his team’s workshop and SOP. It’s how a serious agency runs it today, not a law of nature, and not a promise of results
    • The fan-out example is an example. “Best SEO agency in France” is the one Antoine described. Your question will trigger different searches, and they can change from one week to the next
    • Share of voice is a sample. “Cited one time out of three” depends on how many runs you did and how close your sessions are to real buyers. Ten runs is an indication, not a measurement
    • My landlord’s site is one site. One afternoon, real pages, a validated listing. I’m not claiming rankings or revenue for him here, because I don’t have them to show you
    • The affiliate lead from ChatGPT is one lead. It’s an anecdote that made me notice my “best” habit. It’s not a growth curve
    • Internal tools have limits. What your tracker can see depends on what the assistant’s API returns. Don’t fill a column with guesses
    • Nothing here is a guarantee. GEO results follow SEO results, and SEO is a probability, never a promise

    What I would do this week

    1. Monday: run the first prompt. Keep 5 to 10 target questions, no more
    1. Monday: ask each question 3 times in the assistant your buyers use. Click the search step. Copy every fan-out
    1. Tuesday: clean the list with the second prompt. Keep the fan-outs that come back
    1. Tuesday: open Bing Webmaster Tools and look at the AI Performance report. Note the grounding queries
    1. Wednesday: build the roadmap. One line per fan-out, a pillar for each: on-site or off-site
    1. Wednesday: check your Google position on each on-site fan-out. That’s your real gap
    1. Thursday: update the one page that can win the most fan-outs. Answer every branch
    1. Thursday: list the 5 domains the AI cites most. Write to the first one
    1. Friday: fix your identity: same name, address, phone, listings and social links everywhere
    1. Every week: 20 minutes. Same questions, new fan-outs, the score. Then the work

    The real lesson

    Antoine summed it up at the end, and I’ll keep his words because I can’t do better

    If you remember one thing, the 20/80 is this notion of having very few target questions. If you want to do GEO tomorrow on your brand, you have between 5 and 10 GEO questions, max. You take each one. You go to an assistant, you run it, you look at its fan-outs. You do that once a week, because it moves, and after a few weeks it’s always the same ones. And for each fan-out, you track your position on Google

    Because in the end, you have to be first on Google on each fan-out. And then, naturally, you get cited by the AIs

    That’s the whole thing. GEO is SEO on the searches the AI makes for you

    No dashboard to buy, no new job title to hire, no secret file to add to your site. Ten questions, the searches behind them, a page or a mention for each one, and twenty minutes every Monday to see what moved. Start with the first prompt this week, on your own business, and keep the list short

    The full episode, in French, with Antoine Veyrieres on MVP: https://www.youtube.com/watch?v=jt54RCZxICg

    Thanks for reading!

    🎁 If you want to hire your first AI SEO employee (for free), click here

  • How to Use Free AI Models on OpenRouter in 2026

    How to Use Free AI Models on OpenRouter in 2026

    Verified on: July 11, 2026. OpenRouter may change its free-model availability, limits, and account policies at any time.

    How to Use Free AI Models on OpenRouter in 2026

    OpenRouter allows developers to access many AI models through one OpenAI-compatible API. It also provides a selection of free models that can be used for testing, learning, personal tools, and small AI projects.

    You can use free models in two ways:

    • Use openrouter/free and let OpenRouter automatically select an available free model.
    • Choose a specific model whose ID ends with :free.

    What Is OpenRouter Free?

    The OpenRouter Free Models Router uses this model ID:

    openrouter/free

    When you send a request, OpenRouter chooses a compatible free model based on current availability and the features required by your prompt.

    This is the easiest option for general testing. However, the underlying model may change between requests, so the writing style and response quality may not always be identical.

    Official page:

    https://openrouter.ai/openrouter/free

    OpenRouter Free Models Router automatically selects an available free AI model.

    Step 1: Create an OpenRouter Account

    Visit OpenRouter and sign in:

    https://openrouter.ai/

    After signing in, open the API Keys page:

    https://openrouter.ai/keys

    Click the button to create a new API key. Use a clear name such as:

    wordpress-ai-test
    python-chatbot
    openrouter-free-demo

    An OpenRouter API key normally starts with:

    sk-or-v1-

    Step 2: Find Free Models

    Open the current free-model collection:

    https://openrouter.ai/collections/free-models

    A specific free model usually has an ID ending with:

    :free

    For example:

    provider/model-name:free

    Because free-model availability changes frequently, copy the current model ID directly from the OpenRouter model page instead of using an old model name from another tutorial.

    Step 3: Store the API Key

    On Linux or macOS:

    export OPENROUTER_API_KEY="sk-or-v1-replace-with-your-key"

    For a project using a .env file:

    OPENROUTER_API_KEY=sk-or-v1-replace-with-your-key

    Do not place the key in browser JavaScript, public GitHub repositories, screenshots, WordPress page content, or front-end source code.

    Step 4: Test a Free Model with cURL

    OpenRouter uses the following OpenAI-compatible endpoint:

    https://openrouter.ai/api/v1/chat/completions

    Run this test request:

    curl https://openrouter.ai/api/v1/chat/completions \
      -H "Authorization: Bearer ${OPENROUTER_API_KEY}" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "openrouter/free",
        "messages": [
          {
            "role": "user",
            "content": "Explain what a reverse proxy does in simple terms."
          }
        ],
        "max_tokens": 400
      }'

    To use a specific free model, replace:

    "model": "openrouter/free"

    with the current model ID copied from OpenRouter:

    "model": "provider/model-name:free"

    Use OpenRouter with OpenAI-Compatible Apps

    Many AI clients and development tools support custom OpenAI-compatible APIs. Use the following settings:

    API Base URL:
    https://openrouter.ai/api/v1
    
    API Key:
    sk-or-v1-xxxxxxxxxxxxxxxx
    
    Model:
    openrouter/free

    You can also replace openrouter/free with a specific :free model.

    OpenRouter Free Limits

    Free models are not unlimited. OpenRouter applies daily and rate limits.

    • Accounts without at least 10 purchased credits are generally limited to 50 free-model API requests per day.
    • Accounts that have purchased at least 10 credits are generally allowed up to 1,000 free-model API requests per day.

    These limits may change. Check the latest official documentation before building an application that depends on free access:

    https://openrouter.ai/docs/api/reference/limits

    Common Errors

    401 Unauthorized

    Check that the API key is correct and that the request contains:

    Authorization: Bearer YOUR_API_KEY

    404 or No Available Provider

    The selected free model may no longer be available. Copy the latest model ID from OpenRouter or switch to openrouter/free.

    429 Too Many Requests

    You have reached a rate limit or daily free-model allowance. Wait before retrying and add request limits to your own application.

    Is OpenRouter Free Suitable for Production?

    Free models are useful for testing, small personal tools, demonstrations, and early product prototypes. They are less suitable for important production services because:

    • Free models may be removed or changed.
    • Provider capacity may be temporarily unavailable.
    • Response speed may vary.
    • The automatic free router may use different models.
    • Daily request limits are relatively low.

    For a production application, use a stable model, add fallback models, set timeouts, monitor usage, and configure a maximum budget.

    Security Tips

    • Keep the API key on the server.
    • Create separate keys for development and production.
    • Set a credit limit when creating a key.
    • Add user and IP rate limits to public AI endpoints.
    • Revoke the key immediately if it is exposed.
    • Do not send passwords or confidential data to free models.

    Conclusion

    OpenRouter is one of the easiest ways to test free AI models through a single API. Use openrouter/free when you want OpenRouter to select an available free model automatically, or choose a specific model ending in :free when you need more consistent results.

    The basic process is simple: create an account, generate an API key, select a free model, and send requests to the OpenRouter OpenAI-compatible endpoint.

    Free models are ideal for learning and prototyping, but their availability and limits can change. Always check the current OpenRouter model page before relying on a specific free endpoint.

    Official Sources

  • How to Get a Free NVIDIA AI API Key in 2026: Step-by-Step NIM API Tutorial

    How to Get a Free NVIDIA AI API Key in 2026: Step-by-Step NIM API Tutorial

    Verification date: July 11, 2026. The NVIDIA Build interface, API key application process, endpoint availability, and official documentation referenced in this article were checked on this date. NVIDIA may update model availability, account requirements, rate limits, and free-access policies at any time.

    NVIDIA is best known for GPUs, but the company also provides developers with hosted AI inference APIs through NVIDIA NIM and the NVIDIA Build platform.

    By joining the free NVIDIA Developer Program, you can generate an NVIDIA API key and use eligible hosted NIM endpoints for AI development, experimentation, testing, and prototyping. You do not need to own an NVIDIA GPU or deploy a large language model on your own server to get started.

    This guide explains how to create an NVIDIA account, generate a free NVIDIA AI API key, select an available model, test the key with cURL, and connect NVIDIA NIM to Python, Node.js, PHP, and OpenAI-compatible applications.

    Important: NVIDIA describes these hosted APIs as free serverless APIs for development and as free NIM API access for prototyping. Free access should not be interpreted as a permanent, unlimited, production-grade service-level agreement.

    What Is an NVIDIA AI API Key?

    An NVIDIA AI API key is a credential used to authenticate requests sent to supported NVIDIA-hosted AI endpoints.

    A generated key normally begins with the following prefix:

    nvapi-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    The key is sent in the HTTP Authorization header:

    Authorization: Bearer nvapi-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    Many NVIDIA-hosted large language model endpoints use an API structure compatible with the OpenAI Chat Completions format. This means an application that already supports a custom OpenAI-compatible provider can often connect to NVIDIA by changing three values:

    • The API base URL
    • The API key
    • The model identifier

    What Is NVIDIA NIM?

    NVIDIA NIM, or NVIDIA Inference Microservices, is a collection of optimized inference services designed to simplify the deployment and use of AI models.

    Instead of manually downloading model weights, configuring CUDA libraries, selecting an inference engine, and maintaining a GPU server, developers can use a standardized API to send prompts and receive model responses.

    Depending on the model and licensing conditions, NIM can be used through:

    • NVIDIA-hosted serverless API endpoints
    • Downloadable NIM containers
    • Cloud GPU infrastructure
    • Private data centers
    • NVIDIA RTX workstations
    • Enterprise AI infrastructure

    For this tutorial, we are using the NVIDIA-hosted development endpoints available through NVIDIA Build.

    NVIDIA NIM APIs
    NVIDIA NIM APIs

    What Can You Build with a Free NVIDIA AI API Key?

    The NVIDIA API catalog includes multiple categories of AI models and services. The exact selection changes over time, but available categories may include:

    • Text generation and conversational AI
    • Reasoning models
    • Code generation and code analysis
    • Vision-language models
    • Image and visual-content processing
    • Embedding models
    • Reranking models
    • Speech and audio processing
    • Safety and moderation models
    • Biology, chemistry, climate, and scientific AI models

    Typical development projects include:

    1. AI chatbots
    2. Customer-support assistants
    3. Retrieval-augmented generation systems
    4. Document summarization tools
    5. Code assistants
    6. WordPress AI plugins
    7. Laravel or Node.js AI applications
    8. Semantic search engines
    9. Internal knowledge-base assistants
    10. AI agent prototypes

    Requirements

    To apply for an NVIDIA API key, you generally need:

    • A working email address
    • An NVIDIA account
    • Membership in the NVIDIA Developer Program
    • A modern web browser
    • Acceptance of the applicable NVIDIA terms

    Account-verification requirements can vary by region, account status, and NVIDIA’s current fraud-prevention policies. Follow the instructions displayed during registration.

    Step 1: Open NVIDIA Build

    Open the official NVIDIA Build website:

    https://build.nvidia.com/

    NVIDIA Build is the official catalog for exploring hosted AI endpoints, NIM models, blueprints, code samples, and related AI development resources.

    Step 2: Create or Sign In to Your NVIDIA Account

    Click Sign In.

    If you already have an NVIDIA account, enter your email address and continue with the login process.

    If you do not have an account, enter your email address and complete the registration process. Depending on NVIDIA’s current interface, you may be asked to:

    1. Enter your email address.
    2. Verify your email.

    The NVIDIA API key sign-in page currently states that users receive access to free serverless APIs for development and that proceeding joins the user to the NVIDIA Developer Program.

    Sign in with an NVIDIA account and join the NVIDIA Developer Program.

    Step 3: Open the NVIDIA API Key Settings Page

    After signing in, You can normally create an API key in one of two ways:

    1. Open the API Keys settings page and generate a key.
    2. Open an eligible model and click Get API Key.

    Both methods authenticate your requests against supported NVIDIA-hosted services.

    Step 4: Browse the NVIDIA Model Catalog

    Open the model catalog:

    https://build.nvidia.com/models

    You can also browse the discovery interface:

    https://build.nvidia.com/explore/discover

    Search for a model that provides a hosted endpoint. NVIDIA may display labels such as:

    • Free Endpoint
    • Downloadable
    • Deprecated
    • Partner Endpoint
    • Preview
    LabelMeaning
    Free EndpointA hosted endpoint is available for eligible development or prototyping use.
    DownloadableThe model or NIM can be deployed on supported infrastructure. This does not automatically mean a hosted endpoint is available.
    Partner EndpointThe endpoint may be operated or delivered through an NVIDIA partner.
    DeprecatedThe endpoint has been retired or is scheduled for removal.
    PreviewThe service is intended for evaluation and may change without production-level guarantees.

    Do not assume that every model shown in the catalog can be called for free. Always open the individual model page and confirm its current endpoint status.

    Check each model’s current endpoint status. A model listed in the catalog is not necessarily available as a free hosted endpoint.

    Step 5: Open a Model and Review Its API Example

    Click an available model. A model page may contain:

    • An interactive prompt area
    • A model card
    • API documentation
    • Python examples
    • Node.js examples
    • Shell or cURL examples
    • LangChain examples
    • The exact API model identifier
    • A Get API Key button

    The model identifier is especially important. It may look similar to:

    publisher/model-name

    Always copy the identifier directly from the current model page. Do not rely on an old tutorial, video, or cached model list because NVIDIA can rename, replace, update, or deprecate endpoints.

    Step 6: Generate the NVIDIA API Key

    Click Get API Key, Generate API Key, or the equivalent button shown in your account.

    If NVIDIA asks for a key name, use a descriptive name that identifies the project or environment:

    wordpress-ai-development
    laravel-rag-test
    node-chatbot-production
    local-python-demo

    Avoid using generic names such as test for every key. Descriptive names make it easier to revoke a compromised key without affecting unrelated applications.

    If the interface provides an expiration option, select an appropriate validity period based on the project. A shorter expiration period reduces the risk of abandoned credentials remaining active.

    Step 7: Copy and Secure the Key

    After the key is generated, copy it immediately and store it securely.

    nvapi-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    Do not place the real key in:

    • Public GitHub repositories
    • Browser-side JavaScript
    • Public WordPress source code
    • Blog screenshots
    • Forum posts
    • Application error messages
    • Publicly accessible log files
    • Unencrypted configuration files

    On Linux or macOS, store the key in an environment variable:

    export NVIDIA_API_KEY="nvapi-replace-with-your-real-key"

    On Windows PowerShell:

    $env:NVIDIA_API_KEY="nvapi-replace-with-your-real-key"

    For a project that uses a .env file:

    NVIDIA_API_KEY=nvapi-replace-with-your-real-key

    Add the file to .gitignore:

    .env
    .env.*
    !.env.example

    Step 8: Test the NVIDIA API Key with cURL

    Testing with cURL is the fastest way to confirm that the account, key, endpoint, and model identifier are working before integrating the API into an application.

    For OpenAI-compatible NVIDIA-hosted LLM endpoints, the commonly used base URL is:

    https://integrate.api.nvidia.com/v1

    The Chat Completions endpoint is:

    https://integrate.api.nvidia.com/v1/chat/completions

    First, export the key:

    export NVIDIA_API_KEY="nvapi-replace-with-your-real-key"

    Then send a test request:

    curl --request POST \
      --url https://integrate.api.nvidia.com/v1/chat/completions \
      --header "Authorization: Bearer ${NVIDIA_API_KEY}" \
      --header "Content-Type: application/json" \
      --data '{
        "model": "REPLACE_WITH_THE_CURRENT_MODEL_ID",
        "messages": [
          {
            "role": "system",
            "content": "You are a precise technical assistant."
          },
          {
            "role": "user",
            "content": "Explain NVIDIA NIM in three short paragraphs."
          }
        ],
        "temperature": 0.2,
        "max_tokens": 500,
        "stream": false
      }'

    Replace the following value with the exact model ID displayed on the NVIDIA model page:

    REPLACE_WITH_THE_CURRENT_MODEL_ID

    A successful response should contain a JSON object with fields similar to:

    {
      "id": "chatcmpl-example",
      "object": "chat.completion",
      "choices": [
        {
          "index": 0,
          "message": {
            "role": "assistant",
            "content": "NVIDIA NIM is..."
          },
          "finish_reason": "stop"
        }
      ],
      "usage": {
        "prompt_tokens": 28,
        "completion_tokens": 120,
        "total_tokens": 148
      }
    }

    Enable Streaming Output

    To receive output incrementally, change:

    "stream": false

    to:

    "stream": true

    Use curl -N to disable output buffering:

    curl -N https://integrate.api.nvidia.com/v1/chat/completions \
      -H "Authorization: Bearer ${NVIDIA_API_KEY}" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "REPLACE_WITH_THE_CURRENT_MODEL_ID",
        "messages": [
          {
            "role": "user",
            "content": "Write a short introduction to retrieval-augmented generation."
          }
        ],
        "temperature": 0.3,
        "max_tokens": 500,
        "stream": true
      }'

    Use the NVIDIA API with Python

    Because supported NVIDIA LLM endpoints are OpenAI-compatible, you can use the official OpenAI Python client with a custom base URL.

    1. Install the Python Package

    python3 -m pip install --upgrade openai

    2. Create the Python Script

    import os
    import sys
    
    from openai import OpenAI
    
    
    def main() -> None:
        api_key = os.getenv("NVIDIA_API_KEY")
    
        if not api_key:
            print(
                "Error: NVIDIA_API_KEY is not configured.",
                file=sys.stderr,
            )
            sys.exit(1)
    
        client = OpenAI(
            api_key=api_key,
            base_url="https://integrate.api.nvidia.com/v1",
            timeout=60.0,
            max_retries=2,
        )
    
        try:
            response = client.chat.completions.create(
                model="REPLACE_WITH_THE_CURRENT_MODEL_ID",
                messages=[
                    {
                        "role": "system",
                        "content": (
                            "You are a precise technical writing assistant."
                        ),
                    },
                    {
                        "role": "user",
                        "content": (
                            "Explain the difference between an API "
                            "and an SDK."
                        ),
                    },
                ],
                temperature=0.2,
                max_tokens=500,
            )
    
            content = response.choices[0].message.content
            print(content)
    
        except Exception as error:
            print(
                f"NVIDIA API request failed: {error}",
                file=sys.stderr,
            )
            sys.exit(1)
    
    
    if __name__ == "__main__":
        main()

    Run the script:

    python3 nvidia_api_test.py

    Python Streaming Example

    import os
    import sys
    
    from openai import OpenAI
    
    
    api_key = os.getenv("NVIDIA_API_KEY")
    
    if not api_key:
        print(
            "Error: NVIDIA_API_KEY is not configured.",
            file=sys.stderr,
        )
        sys.exit(1)
    
    client = OpenAI(
        api_key=api_key,
        base_url="https://integrate.api.nvidia.com/v1",
    )
    
    stream = client.chat.completions.create(
        model="REPLACE_WITH_THE_CURRENT_MODEL_ID",
        messages=[
            {
                "role": "user",
                "content": (
                    "Write a practical introduction to Docker Compose."
                ),
            }
        ],
        temperature=0.3,
        max_tokens=800,
        stream=True,
    )
    
    for chunk in stream:
        content = chunk.choices[0].delta.content
    
        if content:
            print(content, end="", flush=True)
    
    print()

    Use the NVIDIA API with Node.js

    1. Create a Node.js Project

    mkdir nvidia-api-demo
    cd nvidia-api-demo
    npm init -y
    npm install openai dotenv

    2. Create the .env File

    NVIDIA_API_KEY=nvapi-replace-with-your-real-key

    3. Create index.mjs

    import "dotenv/config";
    import OpenAI from "openai";
    
    const apiKey = process.env.NVIDIA_API_KEY;
    
    if (!apiKey) {
        console.error(
            "Error: NVIDIA_API_KEY is not configured."
        );
        process.exit(1);
    }
    
    const client = new OpenAI({
        apiKey,
        baseURL: "https://integrate.api.nvidia.com/v1",
        timeout: 60_000,
        maxRetries: 2,
    });
    
    try {
        const response = await client.chat.completions.create({
            model: "REPLACE_WITH_THE_CURRENT_MODEL_ID",
            messages: [
                {
                    role: "system",
                    content: (
                        "You are a professional software " +
                        "engineering assistant."
                    ),
                },
                {
                    role: "user",
                    content: (
                        "Provide five practical Nginx " +
                        "security recommendations."
                    ),
                },
            ],
            temperature: 0.2,
            max_tokens: 600,
        });
    
        console.log(
            response.choices[0].message.content
        );
    } catch (error) {
        console.error(
            "NVIDIA API request failed:",
            error?.message ?? error
        );
        process.exit(1);
    }

    Run the application:

    node index.mjs

    Use the NVIDIA API with PHP

    The following example can be adapted for WordPress, Laravel, or a traditional PHP application.

    <?php
    
    declare(strict_types=1);
    
    $apiKey = getenv('NVIDIA_API_KEY');
    
    if (!$apiKey) {
        throw new RuntimeException(
            'NVIDIA_API_KEY is not configured.'
        );
    }
    
    $payload = [
        'model' => 'REPLACE_WITH_THE_CURRENT_MODEL_ID',
        'messages' => [
            [
                'role' => 'system',
                'content' => (
                    'You are a professional technical assistant.'
                ),
            ],
            [
                'role' => 'user',
                'content' => (
                    'Explain the purpose of a reverse proxy.'
                ),
            ],
        ],
        'temperature' => 0.2,
        'max_tokens' => 500,
        'stream' => false,
    ];
    
    $json = json_encode(
        $payload,
        JSON_UNESCAPED_UNICODE |
        JSON_UNESCAPED_SLASHES |
        JSON_THROW_ON_ERROR
    );
    
    $curl = curl_init(
        'https://integrate.api.nvidia.com/v1/chat/completions'
    );
    
    curl_setopt_array($curl, [
        CURLOPT_POST => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_TIMEOUT => 60,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . $apiKey,
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $json,
    ]);
    
    $response = curl_exec($curl);
    
    if ($response === false) {
        $error = curl_error($curl);
        curl_close($curl);
    
        throw new RuntimeException(
            'cURL request failed: ' . $error
        );
    }
    
    $statusCode = curl_getinfo(
        $curl,
        CURLINFO_HTTP_CODE
    );
    
    curl_close($curl);
    
    if ($statusCode < 200 || $statusCode >= 300) {
        throw new RuntimeException(
            sprintf(
                'NVIDIA API returned HTTP %d: %s',
                $statusCode,
                $response
            )
        );
    }
    
    $data = json_decode(
        $response,
        true,
        512,
        JSON_THROW_ON_ERROR
    );
    
    echo $data['choices'][0]['message']['content']
        ?? $response;

    Never hard-code a production API key directly in a public WordPress plugin or theme file. Use a server-side environment variable or a protected secret-management system.

    Connect NVIDIA NIM to an OpenAI-Compatible Application

    Many AI clients and frameworks support custom OpenAI-compatible providers. The typical configuration is:

    API Base URL:
    https://integrate.api.nvidia.com/v1
    
    API Key:
    nvapi-xxxxxxxxxxxxxxxxxxxxxxxx
    
    Model:
    REPLACE_WITH_THE_CURRENT_MODEL_ID

    This can work with compatible chat interfaces, RAG tools, agent frameworks, workflow platforms, and custom applications.

    However, compatibility is not guaranteed for every feature. A third-party application may expect:

    • A specific response format
    • A working /v1/models endpoint
    • Tool-calling support
    • Structured-output support
    • A specific multimodal message format
    • Parameters that the selected NVIDIA model does not support

    Always test the official model-page example first. Once that succeeds, configure the same endpoint, model ID, and parameters in the third-party application.

    How to Choose an NVIDIA AI Model

    General Chat and Writing

    Choose a general instruction-following model for:

    • Chatbots
    • Article drafting
    • Summarization
    • Translation
    • Customer support
    • Information extraction

    Reasoning

    Choose a reasoning-oriented model for:

    • Multi-step analysis
    • Mathematics
    • Complex coding problems
    • Planning
    • Agent workflows

    Code Generation

    Choose a coding model for:

    • Generating code
    • Debugging
    • Refactoring
    • Writing tests
    • Creating SQL queries
    • Explaining source code

    Vision

    Choose a vision-language model for:

    • Image understanding
    • Screenshot analysis
    • Chart interpretation
    • Visual question answering
    • OCR post-processing

    Embeddings and Reranking

    Choose an embedding or reranking model for:

    • Semantic search
    • RAG pipelines
    • Document retrieval
    • Similarity matching
    • Search-result reranking

    Is the NVIDIA API Really Free?

    NVIDIA’s official developer page currently describes free access to NIM API endpoints for prototyping, powered by NVIDIA infrastructure. The NVIDIA Build API key page also advertises free serverless APIs for development.

    The safest interpretation is:

    NVIDIA provides eligible developers with free hosted API access for development, learning, experimentation, testing, and prototyping, subject to current model availability, access policies, rate limits, and applicable terms.

    Do not assume that the service includes:

    • Unlimited production traffic
    • A guaranteed request rate for every model
    • A permanent endpoint for every model
    • A formal production SLA
    • Unlimited tokens or inference credits
    • Automatic commercial-production rights for every model

    Older NVIDIA forum posts and third-party tutorials may mention fixed credit allocations or a specific request-per-minute value. These figures have changed over time and may not apply uniformly to every model or account in 2026.

    A June 2026 NVIDIA forum discussion indicated that free-tier rate limits can depend on the model, use case, and current platform traffic. For this reason, your application should rely on actual HTTP responses and current account information rather than assuming a universal rate limit.

    Development Access vs. Production Deployment

    Usage TypeTypical PurposeImportant Consideration
    Hosted free endpointLearning, testing, evaluation, and prototypingSubject to model availability, free-access policies, and rate limits
    Self-hosted NIMPrivate development or controlled infrastructureYou provide the GPU infrastructure and must comply with applicable licensing
    Enterprise productionCommercial workloads requiring support and production guaranteesMay require NVIDIA AI Enterprise licensing and production infrastructure

    Before using an endpoint in a commercial production service, verify:

    • The NVIDIA service terms
    • The selected model’s license
    • Data-processing and privacy requirements
    • Production-use restrictions
    • Rate limits
    • Support availability
    • Required enterprise licensing

    Common NVIDIA API Errors

    401 Unauthorized

    A 401 response usually means the API could not authenticate the request.

    Check the following:

    • The API key was copied correctly.
    • The key does not contain leading or trailing spaces.
    • The key has not expired.
    • The key has not been revoked.
    • The request includes the Bearer prefix.

    Correct header:

    Authorization: Bearer nvapi-xxxxxxxx

    Incorrect header:

    Authorization: nvapi-xxxxxxxx

    403 Forbidden

    Possible causes include:

    • The account has not completed verification.
    • The selected model is unavailable to the account.
    • The endpoint has regional or policy restrictions.
    • Updated terms have not been accepted.
    • The selected model is not available as a hosted endpoint.

    404 Model Not Found

    A 404 or model-not-found response can occur when:

    • The model ID is misspelled.
    • The display name was used instead of the API model ID.
    • The model version has changed.
    • The endpoint has been deprecated.
    • A self-hosted model ID was used with a hosted endpoint.

    Return to the current NVIDIA model page and copy its official Shell or Python example.

    429 Too Many Requests

    A 429 response means the request was rate-limited or the current usage allowance was exceeded.

    A production-quality client should implement:

    • Exponential backoff
    • Random jitter
    • Concurrency limits
    • Request queues
    • Response caching
    • Maximum retry counts
    • Fallback behavior

    Example Python retry logic:

    import os
    import random
    import time
    
    from openai import OpenAI, RateLimitError
    
    
    client = OpenAI(
        api_key=os.environ["NVIDIA_API_KEY"],
        base_url="https://integrate.api.nvidia.com/v1",
    )
    
    for attempt in range(5):
        try:
            response = client.chat.completions.create(
                model="REPLACE_WITH_THE_CURRENT_MODEL_ID",
                messages=[
                    {
                        "role": "user",
                        "content": "Hello",
                    }
                ],
                max_tokens=100,
            )
    
            print(response.choices[0].message.content)
            break
    
        except RateLimitError:
            if attempt == 4:
                raise
    
            delay = (2 ** attempt) + random.random()
            print(
                f"Rate limited. Retrying in {delay:.1f} seconds."
            )
            time.sleep(delay)

    400 Bad Request

    A 400 response usually indicates an invalid request. Common causes include:

    • Malformed JSON
    • An unsupported parameter
    • An invalid message structure
    • A token limit that is too high
    • An invalid temperature value
    • An incorrect multimodal input format

    Start with the exact example shown on the model’s API page. Modify one parameter at a time after the original example works.

    Timeouts

    A request may take longer when the model is busy, the prompt is large, the requested output is long, or the selected model performs extensive reasoning.

    Configure reasonable connection and response timeouts:

    curl \
      --connect-timeout 10 \
      --max-time 120 \
      https://integrate.api.nvidia.com/v1/chat/completions

    Do not retry indefinitely. Unlimited retries can increase load and trigger additional rate limiting.

    NVIDIA API Key Security Best Practices

    Never Expose the Key in Browser JavaScript

    This is insecure:

    const apiKey = "nvapi-xxxxxxxx";

    Any visitor can inspect browser source code and network requests.

    Use the following architecture instead:

    Browser
       |
       v
    Your backend API
       |
       v
    NVIDIA-hosted API

    Use Separate Keys

    Create different keys for different projects and environments:

    project-development
    project-staging
    project-production

    If one key is compromised, you can revoke it without disrupting every application.

    Rotate Keys Regularly

    Rotate a key when:

    • It appears in a public repository.
    • It is exposed in a screenshot.
    • An employee or contractor loses access.
    • A server may have been compromised.
    • The key reaches its planned rotation date.

    Protect Your Own API Endpoint

    Even when the upstream NVIDIA endpoint is free for development, your backend should enforce:

    • Per-user rate limits
    • Per-IP rate limits
    • Maximum prompt length
    • Maximum output length
    • Daily usage quotas
    • Authentication
    • Abuse detection
    • Log redaction
    • Cost and usage monitoring

    Example Nginx rate limit:

    limit_req_zone $binary_remote_addr
        zone=ai_api:10m
        rate=5r/s;
    
    server {
        location /api/ai/ {
            limit_req
                zone=ai_api
                burst=10
                nodelay;
    
            proxy_pass http://127.0.0.1:8000;
            proxy_connect_timeout 10s;
            proxy_send_timeout 30s;
            proxy_read_timeout 120s;
        }
    }

    Frequently Asked Questions

    Do I need an NVIDIA GPU?

    No. NVIDIA-hosted endpoints run remotely. Your computer only sends HTTPS requests and receives responses.

    Do I need to install CUDA?

    No. CUDA is not required when you are calling an NVIDIA-hosted endpoint through its web API.

    Is a credit card required?

    The NVIDIA Build sign-in page currently advertises free serverless APIs for development. The basic NVIDIA Developer Program registration and hosted development access do not normally require deploying paid cloud GPU infrastructure. Account requirements can change, so follow the current registration interface.

    Can one API key call multiple models?

    A key can generally authenticate requests to multiple models that the account is authorized to access. However, each model still has its own endpoint status, supported parameters, availability, and usage conditions.

    Can I put the API key in a WordPress page?

    No. Never expose the key in a page, block, shortcode output, or browser-side JavaScript. Send the request from PHP on the WordPress server.

    Can I use the free endpoint in a commercial application?

    The free hosted endpoints are primarily described as development and prototyping services. Before launching a commercial production workload, verify the current NVIDIA terms, model license, production-use conditions, privacy requirements, and any NVIDIA AI Enterprise licensing requirements.

    Why is a model from an older tutorial no longer available?

    NVIDIA regularly changes its model catalog. A model may be renamed, updated, replaced, restricted, or deprecated. Always use the current model catalog rather than copying an old model ID.

    Is there a universal requests-per-minute limit?

    You should not assume one universal limit. NVIDIA forum guidance published in 2026 indicates that free-tier rate limits can depend on the model, use case, and current platform traffic. Handle HTTP 429 responses and inspect the latest account and model documentation.

    Application Checklist

    1. Open NVIDIA Build.
    2. Create or sign in to an NVIDIA account.
    3. Join the NVIDIA Developer Program.
    4. Open the API key settings page.
    5. Browse the current NVIDIA model catalog.
    6. Select a model with an available hosted endpoint.
    7. Copy the exact model ID from its API example.
    8. Generate an API key.
    9. Store the key in a server-side environment variable.
    10. Test the endpoint with cURL.
    11. Integrate it with Python, Node.js, PHP, or another compatible client.
    12. Add authentication, rate limiting, retries, caching, and monitoring.
    13. Recheck licensing and production requirements before commercial deployment.

    Conclusion

    NVIDIA Build provides one of the easiest ways to experiment with hosted AI models without purchasing a GPU or deploying an inference server.

    The basic workflow is straightforward: create an NVIDIA account, join the Developer Program, choose an eligible model, generate an nvapi- key, and test the API with the example provided on the model page.

    The API is especially useful for evaluating models, creating prototypes, building RAG demonstrations, testing AI agents, and adding experimental AI features to Python, Node.js, PHP, Laravel, or WordPress projects.

    Remember that model availability and free-access rules can change. Treat the NVIDIA Build interface and official NVIDIA documentation as the authoritative sources, protect the API key on the server, and verify the licensing requirements before moving a prototype into production.

    ifying this guide:

  • How to Install and Configure a WireGuard VPN Server and Client on Ubuntu, Debian, and Linux Mint

    WireGuard is a lightweight, high-performance VPN protocol designed to provide secure network tunnels with a relatively simple configuration model. It is integrated into modern Linux kernels and can be managed through the wg and wg-quick utilities.

    This tutorial explains how to install and configure a WireGuard VPN server and a Linux client on:

    • Ubuntu 24.04 LTS
    • Ubuntu 22.04 LTS
    • Debian 12 or later
    • Linux Mint 21 or later

    The completed configuration will allow the client to route all IPv4 internet traffic through the WireGuard VPN server.

    Network Configuration Used in This Tutorial

    The following example values are used throughout this guide:

    SettingExample value
    WireGuard interfacewg0
    Server VPN address10.8.0.1/24
    Client VPN address10.8.0.2/24
    WireGuard UDP port51820
    Server public IP203.0.113.10
    Server internet interfaceeth0
    VPN network10.8.0.0/24

    Replace the example server IP address and network interface with the actual values from your environment.


    Prerequisites

    Before starting, make sure you have:

    • A VPS or server running Ubuntu, Debian, or Linux Mint.
    • Root access or a user account with sudo privileges.
    • SSH access to the VPN server.
    • A public IPv4 address or a hostname pointing to the server.
    • UDP port 51820 allowed by the hosting provider or cloud firewall.
    • A Linux client on which WireGuard can be installed.

    This guide assumes that the server has direct internet access and will act as the default gateway for the VPN client.


    Part 1: Configure the WireGuard Server

    Step 1: Update the Server

    Connect to the server through SSH:

    ssh username@SERVER_PUBLIC_IP

    Update the package index:

    sudo apt update

    Optionally install available package updates:

    sudo apt upgrade -y

    The original command:

    sudo apt updatesudo apt install wireguard

    is invalid because it combines two commands without a separator. Each command must be placed on a separate line or joined with &&.


    Step 2: Install WireGuard

    Install the WireGuard userspace tools:

    sudo apt install wireguard -y

    Verify that the command is available:

    wg --version

    You can also confirm that the kernel supports WireGuard:

    sudo modprobe wireguard

    Check whether the module was loaded:

    lsmod | grep wireguard

    On modern Ubuntu and Debian systems, WireGuard support is normally included in the kernel, while the wireguard package provides the administration utilities and related components.


    Step 3: Identify the Server’s Internet Interface

    The WireGuard server must perform Network Address Translation on its external network interface.

    Run:

    ip route show default

    Example output:

    default via 192.0.2.1 dev eth0 proto dhcp src 203.0.113.10

    In this example, the external interface is:

    eth0

    Depending on the server, the interface may instead be named:

    ens3
    enp1s0
    ens18
    venet0

    You can extract the interface name automatically with:

    ip route show default | awk '/default/ {print $5; exit}'

    Record the result because it will be used in the WireGuard server configuration.

    For the examples below, the interface is assumed to be eth0.


    Step 4: Generate the Server Key Pair

    Create a secure directory for the WireGuard configuration:

    sudo install -d -m 700 /etc/wireguard

    Set a restrictive file-creation mask:

    umask 077

    Generate the server’s private key:

    wg genkey | sudo tee /etc/wireguard/server_private.key > /dev/null

    Generate the corresponding public key:

    sudo cat /etc/wireguard/server_private.key \
      | wg pubkey \
      | sudo tee /etc/wireguard/server_public.key > /dev/null

    Verify the file permissions:

    sudo ls -l /etc/wireguard/server_*.key

    The private key should not be readable by unprivileged users.

    Display the server public key:

    sudo cat /etc/wireguard/server_public.key

    Save this public key. It will be required when configuring the client.

    Do not disclose the contents of:

    /etc/wireguard/server_private.key

    WireGuard uses public-key authentication between peers. Each peer keeps its private key secret and shares only its public key.


    Step 5: Enable IPv4 Forwarding

    The server must forward packets between the WireGuard interface and the external network interface.

    Create a dedicated sysctl configuration file:

    sudo nano /etc/sysctl.d/99-wireguard.conf

    Add:

    net.ipv4.ip_forward = 1

    Save the file and apply the setting:

    sudo sysctl --system

    Verify it:

    sysctl net.ipv4.ip_forward

    Expected output:

    net.ipv4.ip_forward = 1

    Using /etc/sysctl.d/99-wireguard.conf is preferable to modifying the main /etc/sysctl.conf file because it keeps the WireGuard-specific setting isolated and easier to manage.


    Step 6: Create the WireGuard Server Configuration

    Read the server private key:

    sudo cat /etc/wireguard/server_private.key

    Create the interface configuration:

    sudo nano /etc/wireguard/wg0.conf

    Add the following configuration:

    [Interface]
    Address = 10.8.0.1/24
    ListenPort = 51820
    PrivateKey = SERVER_PRIVATE_KEY
    
    PostUp = iptables -A FORWARD -i %i -j ACCEPT
    PostUp = iptables -A FORWARD -o %i -j ACCEPT
    PostUp = iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
    
    PostDown = iptables -D FORWARD -i %i -j ACCEPT
    PostDown = iptables -D FORWARD -o %i -j ACCEPT
    PostDown = iptables -t nat -D POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

    Replace:

    SERVER_PRIVATE_KEY

    with the actual contents of:

    /etc/wireguard/server_private.key

    Also replace eth0 with the server’s actual external interface.

    For example:

    PrivateKey = ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcd=

    The private key must appear directly in the configuration. Do not enter a file path such as:

    PrivateKey = /etc/wireguard/server_private.key

    The PrivateKey field expects the key itself, not the name of the file containing it.

    Configuration explanation

    • Address assigns an IP address to the WireGuard interface.
    • ListenPort specifies the UDP port on which the server listens.
    • PrivateKey identifies and authenticates the server.
    • PostUp runs firewall and NAT commands when the interface starts.
    • PostDown removes those rules when the interface stops.
    • %i is replaced automatically by the current WireGuard interface name.
    • MASQUERADE translates VPN client addresses to the server’s external address.

    The original configuration used:

    Address = 10.0.0.1

    It should include a subnet prefix:

    Address = 10.8.0.1/24

    Without the prefix, interface addressing and route creation may not behave as intended.

    Secure the configuration file:

    sudo chmod 600 /etc/wireguard/wg0.conf

    Check the permissions:

    sudo ls -l /etc/wireguard/wg0.conf

    Step 7: Configure the Server Firewall

    UFW configuration

    Check whether UFW is active:

    sudo ufw status verbose

    Allow WireGuard’s UDP port:

    sudo ufw allow 51820/udp

    If SSH access is not already permitted, allow it before enabling UFW:

    sudo ufw allow OpenSSH

    If the SSH service uses a custom port, allow that port instead. For example:

    sudo ufw allow 2222/tcp

    Allow forwarded traffic from the WireGuard interface to the server’s external interface:

    sudo ufw route allow in on wg0 out on eth0

    Allow return traffic in the opposite direction:

    sudo ufw route allow in on eth0 out on wg0

    Replace eth0 with the actual external interface.

    Reload UFW:

    sudo ufw reload

    Check the resulting rules:

    sudo ufw status numbered

    Ubuntu documents UFW as its standard host firewall management tool.

    Cloud firewall configuration

    If the server runs on AWS, Azure, Google Cloud, Oracle Cloud, DigitalOcean, Vultr, Linode, or another VPS platform, also allow this inbound rule in the provider’s firewall:

    Protocol: UDP
    Port: 51820
    Source: 0.0.0.0/0

    For better security, restrict the source address when the client connects from a known static IP.

    Opening the port with UFW does not automatically open it in an external cloud firewall.


    Step 8: Validate the Server Configuration

    Before starting WireGuard, test the configuration by bringing the interface up manually:

    sudo wg-quick up wg0

    Check the interface:

    sudo wg show

    Check its IP address:

    ip address show wg0

    Check the generated route:

    ip route show

    Expected interface information includes:

    interface: wg0
      public key: SERVER_PUBLIC_KEY
      private key: (hidden)
      listening port: 51820

    Take the interface down after testing:

    sudo wg-quick down wg0

    The wg-quick utility reads /etc/wireguard/wg0.conf, creates the interface, assigns its addresses and configures the required routes.


    Step 9: Start and Enable WireGuard

    Start the interface through systemd:

    sudo systemctl start wg-quick@wg0

    Enable it at boot:

    sudo systemctl enable wg-quick@wg0

    Alternatively, perform both operations with:

    sudo systemctl enable --now wg-quick@wg0

    Check the service status:

    sudo systemctl status wg-quick@wg0 --no-pager

    Check that the server is listening on UDP port 51820:

    sudo ss -lunp | grep 51820

    The original command:

    sudo systemctl start wg-quick@wg0.servicesudo systemctl enable wg-quick@wg0.service

    is invalid because it contains two commands without a newline or command separator.

    The .service suffix is optional. The following two forms are equivalent:

    sudo systemctl restart wg-quick@wg0
    sudo systemctl restart wg-quick@wg0.service

    Part 2: Configure the WireGuard Client

    The following steps assume that the client also runs Ubuntu, Debian, or Linux Mint.

    Step 10: Install WireGuard on the Client

    On the client machine, update the package index:

    sudo apt update

    Install WireGuard:

    sudo apt install wireguard -y

    Verify the installation:

    wg --version

    Step 11: Generate the Client Key Pair

    Create the configuration directory:

    sudo install -d -m 700 /etc/wireguard

    Set restrictive permissions:

    umask 077

    Generate the client private key:

    wg genkey | sudo tee /etc/wireguard/client_private.key > /dev/null

    Generate the client public key:

    sudo cat /etc/wireguard/client_private.key \
      | wg pubkey \
      | sudo tee /etc/wireguard/client_public.key > /dev/null

    Display the client public key:

    sudo cat /etc/wireguard/client_public.key

    Copy this value. It must be added to the server configuration.

    Display the client private key:

    sudo cat /etc/wireguard/client_private.key

    The client private key will be added only to the client configuration. Never copy it to the server.


    Step 12: Add the Client as a Peer on the Server

    Return to the WireGuard server and edit:

    sudo nano /etc/wireguard/wg0.conf

    Append:

    [Peer]
    PublicKey = CLIENT_PUBLIC_KEY
    AllowedIPs = 10.8.0.2/32

    Replace CLIENT_PUBLIC_KEY with the public key generated on the client.

    The completed server configuration should resemble:

    [Interface]
    Address = 10.8.0.1/24
    ListenPort = 51820
    PrivateKey = SERVER_PRIVATE_KEY
    
    PostUp = iptables -A FORWARD -i %i -j ACCEPT
    PostUp = iptables -A FORWARD -o %i -j ACCEPT
    PostUp = iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
    
    PostDown = iptables -D FORWARD -i %i -j ACCEPT
    PostDown = iptables -D FORWARD -o %i -j ACCEPT
    PostDown = iptables -t nat -D POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
    
    [Peer]
    PublicKey = CLIENT_PUBLIC_KEY
    AllowedIPs = 10.8.0.2/32

    On the server, AllowedIPs serves two important purposes:

    1. It associates 10.8.0.2 with this client’s public key.
    2. It tells WireGuard which peer should receive packets destined for 10.8.0.2.

    Each client must have a unique VPN address. Do not assign 10.8.0.2 to multiple peers.

    Restart WireGuard:

    sudo systemctl restart wg-quick@wg0

    Verify the peer:

    sudo wg show

    Step 13: Create the Client Configuration

    On the client, obtain the server public key:

    sudo cat /etc/wireguard/server_public.key

    Run this command on the server, not the client, unless you have copied only the server public key to the client.

    On the client, create:

    sudo nano /etc/wireguard/wg0.conf

    Add:

    [Interface]
    PrivateKey = CLIENT_PRIVATE_KEY
    Address = 10.8.0.2/24
    DNS = 1.1.1.1
    
    [Peer]
    PublicKey = SERVER_PUBLIC_KEY
    Endpoint = 203.0.113.10:51820
    AllowedIPs = 0.0.0.0/0
    PersistentKeepalive = 25

    Replace:

    • CLIENT_PRIVATE_KEY with the client private key.
    • SERVER_PUBLIC_KEY with the server public key.
    • 203.0.113.10 with the server’s public IP address or hostname.

    For example:

    Endpoint = vpn.example.com:51820

    Secure the configuration file:

    sudo chmod 600 /etc/wireguard/wg0.conf

    Client configuration explanation

    Address

    Address = 10.8.0.2/24

    This assigns the client its VPN address.

    The original example used:

    Address = 10.0.0.2

    The subnet prefix should be included.

    DNS

    DNS = 1.1.1.1

    This configures a DNS resolver while the tunnel is active.

    Other possible DNS resolvers include:

    DNS = 8.8.8.8

    or a private DNS server reachable through the VPN.

    The DNS directive requires a compatible DNS management utility, commonly resolvconf or systemd-resolved. If wg-quick reports a resolvconf: command not found error, install it:

    sudo apt install resolvconf -y

    Alternatively, remove the DNS line and manage DNS separately.

    Endpoint

    Endpoint = 203.0.113.10:51820

    This specifies the public IP address or DNS hostname of the VPN server and its UDP listening port.

    AllowedIPs

    AllowedIPs = 0.0.0.0/0

    This creates a full-tunnel IPv4 configuration, causing all IPv4 traffic to use the VPN.

    For split tunneling, route only selected networks. For example:

    AllowedIPs = 10.8.0.0/24

    This sends only traffic destined for the WireGuard VPN network through the tunnel.

    To access both the VPN network and a private remote LAN, you could use:

    AllowedIPs = 10.8.0.0/24, 192.168.50.0/24

    WireGuard’s wg-quick utility can automatically create routes based on the networks listed in AllowedIPs, including special handling for default routes.

    PersistentKeepalive

    PersistentKeepalive = 25

    This is useful when the client is behind NAT or a stateful firewall. It periodically sends an authenticated packet to keep the NAT mapping active.

    It is normally configured on the client peer, not on a publicly reachable server.


    Part 3: Start and Test the VPN Client

    Step 14: Bring Up the Client Interface

    Start WireGuard manually:

    sudo wg-quick up wg0

    Check the interface:

    sudo wg show

    Check its address:

    ip address show wg0

    You should see:

    inet 10.8.0.2/24

    Check the route configuration:

    ip route show

    Because this is a full-tunnel configuration, wg-quick may use policy routing rather than replacing the visible main default route directly.


    Step 15: Verify Connectivity

    Test the WireGuard server’s VPN address

    From the client:

    ping -c 4 10.8.0.1

    A successful response confirms that packets can travel through the tunnel.

    Check the WireGuard handshake

    On either the server or client:

    sudo wg show

    Look for:

    latest handshake
    transfer

    Example:

    latest handshake: 15 seconds ago
    transfer: 24.31 KiB received, 18.72 KiB sent

    No latest handshake entry usually means that the server and client have not successfully authenticated and exchanged packets.

    Verify the client’s public IP address

    Before connecting, you can check the client’s normal public IP:

    curl -4 https://ifconfig.me

    After bringing up WireGuard, run the command again:

    curl -4 https://ifconfig.me

    The result should now match the public IP address of the WireGuard server.

    Test DNS resolution

    Run:

    getent hosts example.com

    You can also test HTTPS connectivity:

    curl -I https://example.com

    Step 16: Enable WireGuard at Boot on the Client

    Enable and start the client interface:

    sudo systemctl enable --now wg-quick@wg0

    Check its status:

    sudo systemctl status wg-quick@wg0 --no-pager

    To disable automatic startup later:

    sudo systemctl disable wg-quick@wg0

    Managing the WireGuard Connection

    Disconnect the client

    sudo wg-quick down wg0

    Reconnect the client

    sudo wg-quick up wg0

    Restart the systemd service

    sudo systemctl restart wg-quick@wg0

    Display the current configuration

    sudo wg show

    Display only WireGuard interfaces

    ip link show type wireguard

    Monitor handshakes and traffic continuously

    watch -n 2 sudo wg show

    Ubuntu’s WireGuard troubleshooting documentation also recommends monitoring wg output when diagnosing peer connectivity and handshake issues.


    Adding More WireGuard Clients

    Each additional client requires:

    • A unique private and public key pair.
    • A unique VPN IP address.
    • A separate [Peer] block on the server.

    For example, a second client could use:

    10.8.0.3

    Add the following block to the server:

    [Peer]
    PublicKey = SECOND_CLIENT_PUBLIC_KEY
    AllowedIPs = 10.8.0.3/32

    The second client configuration would contain:

    [Interface]
    PrivateKey = SECOND_CLIENT_PRIVATE_KEY
    Address = 10.8.0.3/24
    DNS = 1.1.1.1
    
    [Peer]
    PublicKey = SERVER_PUBLIC_KEY
    Endpoint = 203.0.113.10:51820
    AllowedIPs = 0.0.0.0/0
    PersistentKeepalive = 25

    Restart the server interface after editing the configuration:

    sudo systemctl restart wg-quick@wg0

    Never reuse a private key or VPN IP address across multiple clients.


    Optional: Apply Peer Changes Without Interrupting Existing Connections

    Restarting wg-quick@wg0 briefly recreates the interface. On a busy VPN server, you may apply peer changes without taking the interface down.

    First verify that the configuration does not contain unsupported values:

    sudo wg-quick strip wg0

    Then synchronize the running WireGuard configuration:

    sudo wg syncconf wg0 <(sudo wg-quick strip wg0)

    This command requires a shell that supports process substitution, such as Bash.

    Alternatively, add a peer directly:

    sudo wg set wg0 peer CLIENT_PUBLIC_KEY allowed-ips 10.8.0.2/32

    Changes made only with wg set are not automatically written to /etc/wireguard/wg0.conf, so they may be lost after a reboot unless the configuration file is also updated.


    Troubleshooting WireGuard

    Problem 1: No WireGuard handshake

    Run on the server:

    sudo wg show

    Check whether UDP port 51820 is listening:

    sudo ss -lunp | grep 51820

    Check UFW:

    sudo ufw status numbered

    Confirm that the cloud provider’s firewall also allows UDP port 51820.

    Check the server logs:

    sudo journalctl -u wg-quick@wg0 --no-pager

    Check recent logs continuously:

    sudo journalctl -u wg-quick@wg0 -f

    Common causes include:

    • An incorrect server endpoint.
    • TCP port 51820 opened instead of UDP.
    • A blocked cloud firewall rule.
    • Incorrect public or private keys.
    • The server service is not running.
    • WireGuard is listening on a different port.
    • The client is using an outdated server public key.

    Problem 2: Handshake succeeds, but there is no internet access

    Check IP forwarding on the server:

    sysctl net.ipv4.ip_forward

    It must return:

    net.ipv4.ip_forward = 1

    Check the NAT rule:

    sudo iptables -t nat -L POSTROUTING -n -v

    Check forwarding rules:

    sudo iptables -L FORWARD -n -v

    Confirm that the external interface in wg0.conf is correct:

    ip route show default

    For example, this rule will not work if the actual external interface is ens3 but the configuration uses eth0:

    PostUp = iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

    Correct it and restart WireGuard:

    sudo systemctl restart wg-quick@wg0

    Problem 3: The VPN works by IP address but DNS fails

    Test direct IP connectivity:

    ping -c 4 1.1.1.1

    Then test DNS:

    getent hosts example.com

    If the first command succeeds but the second fails, the problem is DNS-related.

    Check whether the client configuration contains:

    DNS = 1.1.1.1

    If wg-quick reports that resolvconf is missing, install it:

    sudo apt install resolvconf -y

    Restart the interface:

    sudo wg-quick down wg0
    sudo wg-quick up wg0

    Problem 4: wg-quick up wg0 reports that the interface already exists

    Example error:

    wg-quick: `wg0' already exists

    Check the interface:

    ip link show wg0

    Bring it down:

    sudo wg-quick down wg0

    If that fails, remove the interface manually:

    sudo ip link delete wg0

    Then start it again:

    sudo wg-quick up wg0

    Problem 5: The service fails after editing wg0.conf

    Check the service status:

    sudo systemctl status wg-quick@wg0 --no-pager

    View the detailed logs:

    sudo journalctl -xeu wg-quick@wg0

    Common configuration errors include:

    • Missing private keys.
    • Keys containing extra spaces or line breaks.
    • Invalid IP addresses.
    • Missing CIDR prefixes.
    • Duplicate VPN addresses.
    • Incorrect PostUp or PostDown commands.
    • A DNS directive without a compatible DNS helper.
    • A public key mistakenly placed in the PrivateKey field.

    Problem 6: SSH disconnects when the VPN client starts

    A full-tunnel configuration uses:

    AllowedIPs = 0.0.0.0/0

    This changes how the client routes internet traffic. If you are configuring WireGuard on a remote machine through SSH, the SSH reply traffic may be redirected through the tunnel.

    To test safely, first use split tunneling:

    AllowedIPs = 10.8.0.0/24

    After confirming that the tunnel works, carefully change it to:

    AllowedIPs = 0.0.0.0/0

    Always keep an alternative console or recovery method available when changing routes on a remote system.


    Security Recommendations

    Protect private keys

    WireGuard configuration files should be readable only by root:

    sudo chmod 600 /etc/wireguard/*.conf
    sudo chmod 600 /etc/wireguard/*.key

    Check them:

    sudo find /etc/wireguard -maxdepth 1 -type f -ls

    Never send private keys through email, chat, tickets, logs, or public repositories.

    Restrict the VPN port when possible

    If clients connect from fixed public IP addresses, restrict UDP port 51820:

    sudo ufw delete allow 51820/udp
    sudo ufw allow from CLIENT_PUBLIC_IP to any port 51820 proto udp

    Do not use this restriction for clients whose public IP addresses change frequently.

    Use a separate key for every device

    Do not copy one client configuration to several devices. Unique keys make it possible to revoke one device without affecting other users.

    Remove unused peers

    Delete inactive [Peer] blocks from the server configuration and restart or synchronize the interface.

    Keep the operating system updated

    Install security updates regularly:

    sudo apt update
    sudo apt upgrade -y

    Do not expose the private key through command history

    Avoid placing private keys directly in shell commands. Store them in protected configuration files and verify that those files have restrictive permissions.


    Complete Server Configuration Example

    [Interface]
    Address = 10.8.0.1/24
    ListenPort = 51820
    PrivateKey = SERVER_PRIVATE_KEY
    
    PostUp = iptables -A FORWARD -i %i -j ACCEPT
    PostUp = iptables -A FORWARD -o %i -j ACCEPT
    PostUp = iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
    
    PostDown = iptables -D FORWARD -i %i -j ACCEPT
    PostDown = iptables -D FORWARD -o %i -j ACCEPT
    PostDown = iptables -t nat -D POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
    
    [Peer]
    PublicKey = CLIENT_PUBLIC_KEY
    AllowedIPs = 10.8.0.2/32

    Complete Client Configuration Example

    [Interface]
    PrivateKey = CLIENT_PRIVATE_KEY
    Address = 10.8.0.2/24
    DNS = 1.1.1.1
    
    [Peer]
    PublicKey = SERVER_PUBLIC_KEY
    Endpoint = 203.0.113.10:51820
    AllowedIPs = 0.0.0.0/0
    PersistentKeepalive = 25

    Final Verification Checklist

    On the server, verify:

    sysctl net.ipv4.ip_forward
    sudo systemctl status wg-quick@wg0 --no-pager
    sudo wg show
    sudo ss -lunp | grep 51820
    sudo iptables -t nat -L POSTROUTING -n -v
    sudo ufw status verbose

    On the client, verify:

    sudo systemctl status wg-quick@wg0 --no-pager
    sudo wg show
    ip address show wg0
    ping -c 4 10.8.0.1
    curl -4 https://ifconfig.me
    getent hosts example.com

    A working installation should show:

    • The wg0 interface is active on both systems.
    • The client and server have a recent WireGuard handshake.
    • Transfer counters increase when traffic is generated.
    • The client can reach 10.8.0.1.
    • DNS resolution works.
    • The client’s public IPv4 address matches the VPN server when full tunneling is enabled.

    Conclusion

    You have now installed and configured a WireGuard VPN server and Linux client on Ubuntu, Debian, or Linux Mint.

    The server listens for encrypted WireGuard traffic on UDP port 51820, authenticates the client using public keys, forwards client packets and performs NAT through its external network interface. The client uses AllowedIPs = 0.0.0.0/0 to route all IPv4 traffic through the VPN.

    For split tunneling, replace the client’s default-route entry with only the private networks that should be reachable through WireGuard.

  • Troubleshooting PHP CPU Saturation in a Multi-Site WordPress Hosting Stack

    Running many independent WordPress installations behind one OpenResty/Nginx layer, one PHP-FPM container, and one MySQL instance creates a distinctive failure mode: the server may have abundant free memory while CPU utilization and load average climb until every site becomes slow.

    This article documents a production-style investigation of that pattern. The important lesson is not a single tuning value. It is the method: identify which layer is doing work, measure the work by site and request, find the application behavior multiplying it, reduce concurrency amplification, and verify the result with fresh statistics.

    1. The Initial Symptom

    A typical environment has ample free RAM, a generously sized InnoDB buffer pool, a large PHP-FPM pool, and many independent WordPress sites. Despite the available memory, load average and CPU utilization remain high, with the PHP container appearing to consume most of the CPU.

    This is a common point at which administrators make the wrong first move. Increasing memory, increasing pm.max_children, or increasing MySQL caches may make the system less stable because none of those actions answers the key question:

    Is the server short of memory, waiting for storage, executing expensive code, or admitting too much concurrent work?

    High load is not synonymous with high CPU usage. Linux load includes runnable tasks and tasks blocked in uninterruptible sleep, often storage I/O. Establish the resource bottleneck before tuning either MySQL or PHP.

    2. Classify the Bottleneck First

    Start with operating-system evidence:

    uptime
    nproc
    vmstat 1 10
    iostat -x 1 10
    docker stats
    

    Interpret the important signals as follows:

    SignalLikely meaning
    vmstat runnable queue r remains above the CPU core countCPU scheduling pressure
    us is highUser-space work, commonly PHP or MySQL query execution
    sy is highKernel, networking, container, or syscall overhead
    wa and iostat await are highStorage latency or queueing
    b is high while CPUs remain partly idleTasks blocked on I/O
    si or so is non-zeroActive swapping
    PHP container CPU dominates docker statsPHP request execution requires investigation

    Inspect PHP and MySQL at thread level when necessary:

    top -H -p "$(pidof php-fpm)"
    pidstat -t -p "$(pidof php-fpm)" 1
    top -H -p "$(pidof mysqld)"
    pidstat -u -w -p "$(pidof mysqld)" 1 10
    

    Do not treat a Docker CPU limit as a performance fix. It is useful for isolation, but it only limits the damage after expensive requests have already entered PHP.

    3. Prove Whether MySQL Is the Root Cause or a Victim

    WordPress requests often spend a large part of their lifetime waiting on MySQL. Conversely, inefficient WordPress plugin behavior can make both PHP and MySQL busy. The layers must be correlated rather than investigated independently.

    3.1 Check active database concurrency

    SHOW GLOBAL STATUS WHERE Variable_name IN (
        'Threads_connected',
        'Threads_running',
        'Max_used_connections',
        'Connections'
    );
    
    SHOW FULL PROCESSLIST;
    

    Threads_running is more useful than the number of connected or sleeping sessions. If it remains well above the available CPU core count, queries are competing for CPU or other shared resources. Raising max_connections does not resolve this; it permits a larger overload event.

    Check locks separately:

    SELECT * FROM sys.innodb_lock_waits;
    
    SELECT
        trx_id,
        trx_mysql_thread_id,
        trx_started,
        trx_state,
        trx_rows_locked,
        trx_rows_modified,
        LEFT(trx_query, 300) AS trx_query
    FROM information_schema.innodb_trx
    ORDER BY trx_started;
    

    3.2 Use statement digests, not isolated slow-query anecdotes

    The slow query log finds individually slow statements. Performance Schema digests also reveal inexpensive statements executed millions of times and queries whose aggregate cost dominates the server.

    SELECT
        SCHEMA_NAME,
        DIGEST_TEXT,
        COUNT_STAR,
        ROUND(SUM_TIMER_WAIT / 1000000000000, 2) AS total_seconds,
        ROUND(AVG_TIMER_WAIT / 1000000000, 2) AS avg_ms,
        SUM_ROWS_EXAMINED,
        SUM_ROWS_SENT,
        SUM_CREATED_TMP_DISK_TABLES,
        SUM_SORT_ROWS
    FROM performance_schema.events_statements_summary_by_digest
    WHERE SCHEMA_NAME IS NOT NULL
    ORDER BY SUM_TIMER_WAIT DESC
    LIMIT 30;
    

    Read the digest table in two dimensions:

    • High aggregate time: statements that consume the most database capacity overall.
    • High execution count or rows examined: individually fast statements whose frequency or scan volume makes them expensive.

    A query does not need to appear in the slow query log to be a major resource consumer. For example, a 5 ms query executed ten million times consumes far more capacity than an isolated five-second administration query. Likewise, a lookup that returns one row but examines hundreds of thousands usually indicates an unsuitable access path.

    When a suspicious digest is found, identify the affected schema, capture the parameterized query shape, inspect the table and indexes, and test the execution plan:

    SHOW CREATE TABLE target_table\G
    SHOW INDEX FROM target_table;
    
    EXPLAIN ANALYZE
    SELECT selected_columns
    FROM target_table
    WHERE indexed_candidate = 'sample value'
    LIMIT 1;
    

    Use EXPLAIN instead of EXPLAIN ANALYZE if executing the statement could be unsafe or excessively expensive. Optimize from actual column types, selectivity, and query patterns rather than adding every filtered column to one large index.

    3.3 Read buffer-pool statistics correctly

    Collect the relevant status counters:

    SHOW GLOBAL STATUS WHERE Variable_name IN (
        'Innodb_buffer_pool_pages_dirty',
        'Innodb_buffer_pool_pages_free',
        'Innodb_buffer_pool_read_requests',
        'Innodb_buffer_pool_reads',
        'Innodb_buffer_pool_wait_free',
        'Innodb_log_waits'
    );
    

    With the usual 16 KiB InnoDB page size, free pages can be converted into approximate unused capacity. Physical reads should be compared with logical read requests, while dirty pages, buffer-pool waits, and redo-log waits reveal different forms of pressure.

    The buffer-pool hit rate can be estimated as:

    1 - Innodb_buffer_pool_reads / Innodb_buffer_pool_read_requests

    If the hit rate is already extremely high and many pages remain free, adding more buffer-pool memory will not fix CPU-heavy scans. Data can be fully cached while MySQL still compares a large number of rows on every call. Conversely, do not use hit rate alone: examine waits, working-set size, query plans, and storage latency together.

    4. Fix the Application Multiplier Before Tuning Around It

    Once an expensive query or request pattern is identified, determine which WordPress component produces it. The source may be core behavior, a theme, a plugin, a scheduled task, an AJAX endpoint, a REST endpoint, or hostile traffic repeatedly invoking valid application code.

    Choose the least complex durable correction:

    1. Remove or disable a feature that has no business value.
    2. Reduce how often it runs through caching, batching, or scheduling.
    3. Fix its query shape or add a selective index after plan analysis.
    4. Move long-running work out of web requests and into controlled background jobs.
    5. Rate-limit or block abusive callers before they enter PHP.

    Avoid tuning infrastructure merely to preserve wasteful behavior. A query reduced from 500 ms to 50 ms is still expensive if an unnecessary endpoint calls it millions of times.

    For shared fixes across independently installed sites, a carefully maintained must-use plugin can enforce common policies from each site’s wp-content/mu-plugins/ directory. Use this only for behavior that is truly universal, document it, and test it against plugin and WordPress upgrades.

    Proxy identity is another common multiplier. Applications should prefer a trusted, normalized client address and must not blindly trust client-supplied X-Forwarded-For. Misconfigured proxy chains can duplicate addresses, defeat per-IP controls, and create inconsistent application keys.

    5. Why Excessive PHP-FPM Concurrency Amplifies Incidents

    Consider a PHP-FPM pool configured as:

    pm = static
    pm.max_children = 400

    In static mode, FPM maintains exactly pm.max_children workers. The settings pm.start_servers, pm.min_spare_servers, and pm.max_spare_servers do not apply.

    A very large static pool is not automatically capable of the same number of useful concurrent requests. When requests are CPU-heavy or generate expensive SQL, excessive concurrency creates:

    • excessive runnable processes and context switching;
    • contention for CPU caches and memory bandwidth;
    • a burst of simultaneous MySQL work;
    • increased tail latency;
    • a feedback loop in which slow requests occupy workers longer and admit more competing work.

    Nginx queueing a short burst is often healthier than allowing hundreds of WordPress requests to execute simultaneously.

    An illustrative dynamic-pool starting point for a large server is:

    [www]
    listen = 0.0.0.0:9000
    listen.backlog = 1024
    
    pm = dynamic
    pm.max_children = 100
    pm.start_servers = 16
    pm.min_spare_servers = 8
    pm.max_spare_servers = 24
    pm.max_requests = 500
    
    pm.status_path = /status
    slowlog = /var/log/php/fpm.slow.log
    request_slowlog_timeout = 3s
    request_terminate_timeout = 60s
    

    This is a starting point, not a universal formula. Choose the final limit from three constraints:

    1. Worker memory: measure RSS and preferably proportional set size under real traffic.
    2. CPU capacity: determine where additional concurrency stops increasing throughput.
    3. Backend capacity: ensure PHP cannot create more simultaneous database or external API work than those services can sustain.

    Useful worker-memory measurements include:

    ps --no-headers -o rss -C php-fpm | awk '
    {sum += $1; count++}
    END {
        if (count) {
            printf "workers=%d avg=%.2fMB total=%.2fMB\n", \
                count, sum/count/1024, sum/1024
        }
    }'
    

    pm.max_requests periodically replaces workers and limits long-term growth caused by extensions or plugin code. request_terminate_timeout prevents a pathological request from occupying a worker indefinitely, but long-running imports and maintenance tasks may require a separate pool or CLI worker rather than a globally larger timeout.

    6. Validate and Tune OPcache with Evidence

    Inspect OPcache with opcache_get_status(false) and focus on used and free bytecode memory, interned-string capacity, cached script count, restart counters, and JIT utilization. Common warning signs include little free memory, a completely full interned-strings buffer, or a large JIT allocation with negligible use.

    The configuration was changed to provide ample bytecode and interned-string capacity and to disable JIT:

    [opcache]
    opcache.enable = 1
    opcache.enable_cli = 0
    opcache.memory_consumption = 4096
    opcache.interned_strings_buffer = 256
    opcache.max_accelerated_files = 100000
    opcache.validate_timestamps = 1
    opcache.revalidate_freq = 60
    opcache.save_comments = 1
    opcache.jit = 0
    opcache.jit_buffer_size = 0
    

    These values are examples, not defaults for every host. Size the bytecode memory, interned-strings buffer, and accelerated-file table from measured usage, then leave reasonable growth capacity. A healthy steady state has free space, no recurring OOM or hash restarts, low wasted memory, and enough cached-key capacity for all active sites.

    A modest overall hit rate immediately after restart is not evidence of failure. A host with many sites must compile a large number of unique scripts during cache warm-up. The correct test is the incremental hit rate over a stable interval:

    incremental hit rate = delta(hits) / (delta(hits) + delta(misses))

    Do not keep enlarging OPcache once it has comfortable free space and no restart events. At that point, request behavior and concurrency are the more important CPU targets.

    7. Add One PHP-FPM Access Log for Every Site in the Pool

    Nginx access logs and PHP-FPM access logs are independent. A per-site Nginx access_log does not override the FPM pool’s access.log.

    Add the following once to the shared [www] pool:

    access.log = /var/log/php/fpm.access.log
    access.format = "%t host=%{HTTP_HOST}e client=%R method=%m uri=%{REQUEST_URI}e script=%f status=%s duration=%{milliseconds}dms memory=%{megabytes}MMB cpu=%C%%"
    

    Every request reaching this pool will be written to the same file, and host= identifies the site.

    Ensure the common FastCGI configuration supplies the required values:

    include fastcgi_params;
    
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTP_HOST       $host;
    fastcgi_param REQUEST_URI     $request_uri;
    fastcgi_param REMOTE_ADDR     $remote_addr;
    fastcgi_param HTTP_X_REAL_IP  $remote_addr;
    fastcgi_param HTTP_X_FORWARDED_FOR $http_x_forwarded_for;

    After real_ip_header has accepted a header only from trusted proxy addresses, $remote_addr should represent the normalized client IP. Avoid repeatedly appending the same address at every proxy layer.

    Validate before reloading:

    nginx -t
    php-fpm -tt

    In containers, verify the FPM SAPI configuration rather than assuming CLI php -i reads the same files.

    8. Rank URLs by Estimated CPU Time, Not by Summed Percentages

    The FPM %C field is the percentage of CPU used by a request during its lifetime. Simply adding percentages across requests is dimensionally wrong: a 100% request lasting 20 ms costs far less CPU than a 40% request lasting 5 seconds.

    Estimate CPU time per request as:

    CPU milliseconds = duration milliseconds x CPU percent / 100

    The following parser ranks host + URI by estimated cumulative CPU time. It expects the exact key-value log format shown above:

    awk '
    {
        host = uri = "";
        duration_ms = cpu_pct = 0;
    
        for (i = 1; i <= NF; i++) {
            if ($i ~ /^host=/) {
                host = substr($i, 6);
            } else if ($i ~ /^uri=/) {
                uri = substr($i, 5);
            } else if ($i ~ /^duration=/) {
                value = substr($i, 10);
                sub(/ms$/, "", value);
                duration_ms = value + 0;
            } else if ($i ~ /^cpu=/) {
                value = substr($i, 5);
                sub(/%$/, "", value);
                cpu_pct = value + 0;
            }
        }
    
        if (host != "" && uri != "") {
            key = host " " uri;
            cpu_ms[key] += duration_ms * cpu_pct / 100;
            wall_ms[key] += duration_ms;
            requests[key]++;
        }
    }
    END {
        for (key in requests) {
            printf "%.0f\t%d\t%.1f\t%.0f\t%s\n", \
                cpu_ms[key], \
                requests[key], \
                cpu_ms[key] / requests[key], \
                wall_ms[key] / requests[key], \
                key;
        }
    }' /var/log/php/fpm.access.log \
    | sort -t $'\t' -k1,1nr \
    | head -50
    

    The columns are:

    estimated_cpu_ms    requests    avg_cpu_ms    avg_wall_ms    host URI

    Use a similar aggregation by host to find the sites consuming the most PHP CPU:

    awk '
    {
        host = ""; duration_ms = cpu_pct = 0;
        for (i = 1; i <= NF; i++) {
            if ($i ~ /^host=/) host = substr($i, 6);
            else if ($i ~ /^duration=/) {
                v = substr($i, 10); sub(/ms$/, "", v); duration_ms = v + 0;
            } else if ($i ~ /^cpu=/) {
                v = substr($i, 5); sub(/%$/, "", v); cpu_pct = v + 0;
            }
        }
        if (host != "") {
            cpu_ms[host] += duration_ms * cpu_pct / 100;
            requests[host]++;
        }
    }
    END {
        for (host in requests)
            printf "%.0f\t%d\t%.1f\t%s\n", \
                cpu_ms[host], requests[host], cpu_ms[host]/requests[host], host;
    }' /var/log/php/fpm.access.log \
    | sort -t $'\t' -k1,1nr \
    | head -30
    

    These are estimates based on FPM’s reported average CPU percentage, but they are much more meaningful than sorting single requests or summing percentages.

    Normalize query strings when appropriate. Otherwise tracking parameters and search terms may split one endpoint into thousands of keys. Conversely, keep query strings when a particular parameter is suspected of triggering expensive behavior.

    9. Correlate Expensive URLs with Slow Stacks

    The FPM access log answers which host and URI consumed resources. The FPM slow log helps answer which PHP code path was active:

    slowlog = /var/log/php/fpm.slow.log
    request_slowlog_timeout = 3s

    Inspect it with:

    tail -200 /var/log/php/fpm.slow.log

    Look for plugin and theme paths in backtraces. Common expensive WordPress endpoints include:

    • /wp-cron.php;
    • /wp-admin/admin-ajax.php;
    • /xmlrpc.php;
    • REST endpoints under /wp-json/;
    • search, filtering, and uncached product pages;
    • form submission, search, filtering, and reporting endpoints.

    Slow wall time does not always mean high CPU. A request with low estimated CPU time but long duration is probably waiting on MySQL, storage, DNS, an external API, or a lock. A request with both high CPU time and high wall time is a stronger candidate for expensive PHP execution.

    10. Reduce How Often Requests Reach PHP

    FPM tuning controls the blast radius; it does not eliminate unnecessary executions. For mostly anonymous WordPress sites, the most effective CPU optimization is often full-page caching at Nginx, OpenResty, or the CDN.

    The desired path is:

    Client -> CDN or FastCGI cache hit -> response

    rather than:

    Client -> Nginx -> PHP-FPM -> WordPress bootstrap -> plugins -> MySQL

    Also consider:

    • disabling visitor-triggered WP-Cron and scheduling it from the system;
    • staggering cron execution across many sites instead of starting all jobs on the same minute;
    • auditing Action Scheduler backlogs and high-frequency hooks;
    • using persistent object caching where it measurably reduces repeat database work;
    • rate-limiting abusive endpoints before PHP;
    • applying bot controls at Cloudflare or Nginx, with carefully maintained allowlists;
    • disabling or replacing plugins whose per-request work has little business value.

    In the database digests, Action Scheduler lookups were individually fast but executed more than 160 million times. High-frequency cheap calls may not lead the aggregate-time table, yet they reveal a large background-work volume worthy of separate investigation.

    11. Logging and Proxy Configuration Pitfalls

    Nginx and FPM logs do not override each other

    An access_log inside a server block overrides inherited Nginx access logs at the http level for that server, unless multiple destinations are explicitly declared. It does not affect PHP-FPM’s access.log.

    Keeping per-site Nginx logs plus one shared FPM log is a useful arrangement:

    LogPrimary use
    Per-site Nginx access logTraffic, bots, status codes, total and upstream time
    Shared FPM access logPHP duration, memory, estimated CPU, executing script
    Shared FPM slow logPHP stack samples for slow requests

    proxy_set_header does not configure FastCGI

    Headers declared with proxy_set_header apply to proxy_pass. They do not automatically become FastCGI parameters. Values required by PHP must be supplied with fastcgi_param, preferably in a common include used by all sites.

    Rotate the shared FPM log

    A global log for many sites can grow rapidly. Configure rotation in the host or container logging system. A simple logrotate policy might use daily rotation, compression, seven retained files, and a safe FPM reopen signal. copytruncate is convenient but can lose a small number of lines and imposes copying overhead on large files; signaling FPM to reopen the log is preferable when supported by the deployment.

    12. A Reliable Verification Loop

    Performance Schema and OPcache counters are cumulative. Old values remain after a fix and can make successful changes look ineffective.

    Use a controlled before-and-after process:

    1. Record OS, FPM, MySQL, and OPcache baselines.
    2. Make one logically related change set.
    3. Validate configuration syntax.
    4. Restart or reload only the required service.
    5. Reset the relevant performance summary or record counter deltas.
    6. Observe through a representative traffic interval.
    7. Compare request rate, CPU time, latency, error rate, FPM queueing, and database work.

    To reset only MySQL statement digest statistics:

    TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
    

    This does not delete application data. After waiting through a representative traffic interval, query the digest table again and compare the new aggregate time, execution count, rows examined, temporary tables, and sort work with the baseline.

    For PHP-FPM, monitor:

    listen queue
    max listen queue
    active processes
    idle processes
    max active processes
    max children reached
    slow requests
    

    Do not automatically raise pm.max_children when max children reached increases. If CPUs are already saturated, more workers usually increase contention. First determine whether queueing comes from insufficient capacity or slow and unnecessary requests.

    13. Recommended Incident Order of Operations

    For this class of multi-site WordPress incident, the following order minimizes guesswork:

    1. Classify CPU, I/O, swapping, or lock pressure with OS metrics.
    2. Identify the busiest container and processes.
    3. Inspect MySQL active threads, locks, and aggregate statement digests.
    4. Fix, cache, reschedule, rate-limit, or disable the dominant application behavior.
    5. Reduce excessive PHP-FPM concurrency to a measured starting point.
    6. Verify OPcache capacity and disable unhelpful JIT for WordPress workloads.
    7. Add one structured FPM access log for the shared pool.
    8. Rank sites and URLs by estimated CPU time, request volume, and wall time.
    9. Correlate expensive requests with FPM slow-log stacks.
    10. Add page caching, staggered cron, endpoint rate limits, and component-specific fixes.
    11. Reset or delta the counters and verify the improvement under real traffic.

    Conclusion

    In this class of incident, insufficient RAM is often not the central problem. High-frequency application work, excessive PHP concurrency, and weak request-level attribution combine to make every layer appear overloaded at once.

    The durable solution combined application, database, runtime, and observability changes:

    • remove unnecessary work and optimize the remaining query and request paths;
    • prevent PHP concurrency from overwhelming CPU and MySQL;
    • size OPcache from measured usage and interpret post-restart misses as warm-up;
    • log every FPM request with host, URI, duration, memory, and CPU percentage;
    • rank URLs using estimated CPU time rather than summed percentages;
    • keep anonymous requests out of PHP through caching and edge controls;
    • verify every change with fresh or delta-based counters.

    That method scales beyond WordPress. Whenever a shared application runtime hosts many tenants, aggregate cost and concurrency amplification matter more than isolated slow requests—and observability must preserve the tenant and endpoint dimensions needed to find them.

  • How to Configure Nginx as a Reverse Proxy for WordPress in a Subdirectory

    Running WordPress behind an Nginx reverse proxy requires more than simply forwarding requests to another server. When the site is published under a subdirectory such as /news, the proxy must preserve the request path, pass the original protocol and hostname, and safely restore the visitor’s real IP address.

    This guide explains how to expose a WordPress installation at:

    https://example.com/news/

    while WordPress is hosted on a separate backend server.

    Architecture Overview

    This setup uses two servers.

    Server A: Public Reverse Proxy

    • Accepts public HTTP and HTTPS traffic
    • Terminates TLS connections
    • Redirects HTTP traffic to HTTPS
    • Proxies requests under /news/ to Server B
    • Passes the original hostname, protocol, and client IP information

    Server B: WordPress Backend

    • Hosts the WordPress files
    • Runs Nginx and PHP-FPM
    • Accepts traffic from Server A
    • Restores the real client IP from trusted proxy headers
    • Recognizes that the original request used HTTPS

    The public WordPress URL will be:

    https://example.com/news/

    This guide assumes that WordPress is installed under the /news directory on Server B. For example:

    /var/www/example.com/news/

    Important Nginx Proxy Path Rule

    Nginx handles proxy_pass differently depending on whether the upstream address includes a URI path.

    For this setup, use the following configuration:

    location /news/ {
        proxy_pass http://wordpress_backend;
    }

    Because the proxy_pass directive does not include an additional URI, Nginx forwards the complete original request path.

    For example, this public request:

    /news/wp-admin/

    is forwarded to Server B as:

    /news/wp-admin/

    This avoids accidental path replacement caused by inconsistent trailing slashes in the location and proxy_pass directives.

    Step 1: Configure Nginx on Server A

    Create or edit the Nginx virtual host configuration for example.com.

    Depending on your Linux distribution, the configuration may be stored in one of these locations:

    /etc/nginx/conf.d/example.com.conf

    or:

    /etc/nginx/sites-available/example.com

    Define the WordPress Backend

    Using an upstream block makes the proxy configuration easier to maintain.

    upstream wordpress_backend {
        server B_SERVER_IP:80;
        keepalive 16;
    }

    Replace B_SERVER_IP with the private or public IP address of Server B.

    Whenever possible, use a private network address so that traffic between the two servers does not travel over the public Internet.

    Redirect HTTP Traffic to HTTPS

    server {
        listen 80;
        listen [::]:80;
    
        server_name example.com www.example.com;
    
        return 301 https://example.com$request_uri;
    }

    This redirects all HTTP requests to the canonical HTTPS hostname while preserving the original URI.

    Configure the HTTPS Reverse Proxy

    server {
        listen 443 ssl;
        listen [::]:443 ssl;
    
        server_name example.com;
    
        ssl_certificate     /etc/nginx/ssl/example.com/fullchain.pem;
        ssl_certificate_key /etc/nginx/ssl/example.com/private.key;
    
        client_max_body_size 64m;
    
        location = /news {
            return 301 /news/;
        }
    
        location /news/ {
            proxy_pass http://wordpress_backend;
    
            proxy_http_version 1.1;
    
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-Host $host;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Forwarded-Port $server_port;
    
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    
            proxy_set_header Connection "";
    
            proxy_connect_timeout 10s;
            proxy_send_timeout 60s;
            proxy_read_timeout 60s;
    
            proxy_buffering on;
            proxy_buffer_size 16k;
            proxy_buffers 8 16k;
            proxy_busy_buffers_size 32k;
        }
    
        add_header Strict-Transport-Security "max-age=31536000" always;
    }

    Understanding the Proxy Headers

    Preserve the Public Hostname

    proxy_set_header Host $host;

    This preserves the public hostname, such as example.com.

    WordPress uses the hostname when generating redirects, canonical URLs, administration URLs, media URLs, and other links.

    Forward the Original Protocol

    proxy_set_header X-Forwarded-Proto $scheme;

    This tells Server B whether the original visitor used HTTP or HTTPS.

    Although Server A may connect to Server B over HTTP, the browser connection can still use HTTPS. WordPress must know the original protocol to avoid redirect loops, insecure cookies, and mixed-content URLs.

    Forward the Client IP Address

    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    X-Real-IP contains the address that connected directly to Server A.

    X-Forwarded-For maintains the complete proxy chain by appending the current client IP to any existing forwarded addresses.

    Server B must trust these headers only when the request comes from Server A.

    Why proxy_redirect Is Usually Unnecessary

    Older reverse-proxy examples often include a directive similar to this:

    proxy_redirect http://B_SERVER_IP/news/ /news/;

    This rule is normally unnecessary when:

    • The original Host header is preserved
    • WordPress home and siteurl use the public HTTPS URL
    • WordPress correctly detects the forwarded HTTPS protocol

    It is generally better to correct URL generation at the WordPress and proxy-header level than to rewrite backend redirects manually.

    If Server B still returns redirects containing its private IP address or internal hostname, verify the WordPress URL settings and forwarded headers before adding a custom proxy_redirect rule.

    Test and Reload Nginx on Server A

    sudo nginx -t

    If the configuration test succeeds, reload Nginx:

    sudo systemctl reload nginx

    A reload is normally preferable to a restart because it applies the new configuration without abruptly terminating active connections.

    Step 2: Configure Real Client IP Handling on Server B

    Without additional configuration, Server B sees Server A as the direct client.

    Use the Nginx Real IP module to restore the original visitor IP address safely.

    Verify the Nginx Real IP Module

    nginx -V 2>&1 | grep -o 'http_realip_module'

    If the module is available, the command should return:

    http_realip_module

    Most standard Nginx packages include this module.

    Trust Only Server A

    Add the following directives inside the Nginx http block on Server B:

    http {
        set_real_ip_from A_SERVER_IP;
        real_ip_header X-Forwarded-For;
        real_ip_recursive on;
    
        # Other Nginx configuration...
    }

    Replace A_SERVER_IP with the address that Server A uses to connect to Server B.

    For example:

    set_real_ip_from 10.10.0.10;

    If the servers communicate over IPv6, add the trusted IPv6 address as well:

    set_real_ip_from 2001:db8::10;

    Do Not Trust All IP Addresses

    Avoid unrestricted configurations such as:

    set_real_ip_from 0.0.0.0/0;

    If Server B is reachable by untrusted clients, an attacker could submit a forged X-Forwarded-For header and impersonate another IP address.

    Only Server A and other known reverse proxies should be permitted to supply trusted client IP headers.

    How real_ip_recursive Works

    real_ip_recursive on;

    When multiple trusted proxies are involved, this setting instructs Nginx to examine the forwarded IP chain and select the last address that does not belong to a trusted proxy.

    It is also safe in a single-proxy architecture when the trusted proxy list is configured correctly.

    Step 3: Configure Nginx on Server B

    Because Server A preserves the original Host header, the backend virtual host should recognize example.com.

    A basic WordPress backend configuration may look like this:

    server {
        listen 80;
    
        server_name example.com;
    
        root /var/www/example.com;
        index index.php index.html;
    
        client_max_body_size 64m;
    
        location = /news {
            return 301 /news/;
        }
    
        location /news/ {
            try_files $uri $uri/ /news/index.php?$args;
        }
    
        location ~ ^/news/.*\.php$ {
            try_files $uri =404;
    
            include fastcgi_params;
    
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param SCRIPT_NAME $fastcgi_script_name;
    
            fastcgi_pass unix:/run/php/php8.4-fpm.sock;
        }
    
        location ~* ^/news/.*\.(?:css|js|jpg|jpeg|gif|png|svg|webp|ico|woff|woff2|ttf)$ {
            expires 7d;
            access_log off;
            try_files $uri =404;
        }
    }

    Adjust the PHP-FPM socket for the PHP version installed on Server B.

    Common examples include:

    /run/php/php8.3-fpm.sock
    /run/php/php8.4-fpm.sock

    PHP-FPM may also listen on a TCP port:

    fastcgi_pass 127.0.0.1:9000;

    Expected WordPress Directory Structure

    With this configuration, WordPress should be installed at:

    /var/www/example.com/news/

    The WordPress front controller should therefore be:

    /var/www/example.com/news/index.php

    Test and Reload Nginx on Server B

    sudo nginx -t
    sudo systemctl reload nginx

    Step 4: Make WordPress Recognize Forwarded HTTPS

    Server B receives an HTTP request from Server A even though the visitor connected to Server A over HTTPS.

    Without additional handling, WordPress may believe that the request is insecure. This can cause:

    • Infinite HTTPS redirect loops
    • HTTP administration URLs
    • Mixed-content warnings
    • Incorrect canonical URLs
    • Login and cookie problems

    Add the following code to wp-config.php before WordPress loads wp-settings.php.

    // Trust the forwarded protocol only when the request comes from Server A.
    $trusted_proxy_ips = [
        'A_SERVER_IP',
    ];
    
    if (
        in_array($_SERVER['REMOTE_ADDR'] ?? '', $trusted_proxy_ips, true)
        && isset($_SERVER['HTTP_X_FORWARDED_PROTO'])
    ) {
        $forwarded_proto = strtolower(
            trim(explode(',', $_SERVER['HTTP_X_FORWARDED_PROTO'])[0])
        );
    
        if ($forwarded_proto === 'https') {
            $_SERVER['HTTPS'] = 'on';
            $_SERVER['SERVER_PORT'] = 443;
        }
    }

    Replace A_SERVER_IP with the actual address of Server A.

    The code should be placed before this line:

    require_once ABSPATH . 'wp-settings.php';

    Do Not Rewrite REMOTE_ADDR in WordPress

    Some configurations use PHP code such as:

    $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'];

    or:

    $_SERVER['REMOTE_ADDR'] = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])[0];

    This is not recommended when Nginx is already configured with the Real IP module.

    Nginx should validate the trusted proxy and restore the real client IP before PHP receives the request.

    After the backend Nginx configuration is correct, this PHP variable should already contain the visitor IP:

    $_SERVER['REMOTE_ADDR']

    Directly trusting X-Real-IP or X-Forwarded-For inside PHP can create an IP spoofing vulnerability when Server B is reachable without passing through Server A.

    Step 5: Configure the Public WordPress URLs

    The WordPress Address and Site Address should both use the public HTTPS URL.

    In the WordPress dashboard, open:

    Settings → General

    Set the following values:

    WordPress Address (URL): https://example.com/news
    Site Address (URL):      https://example.com/news

    Define the URLs in wp-config.php

    You may explicitly define the public URLs in wp-config.php:

    define('WP_HOME', 'https://example.com/news');
    define('WP_SITEURL', 'https://example.com/news');

    This prevents the URLs from being changed through the WordPress dashboard and ensures that WordPress consistently generates the correct public address.

    Do not add a trailing slash to these values.

    Update the URLs with WP-CLI

    cd /var/www/example.com/news
    
    wp option update home 'https://example.com/news'
    wp option update siteurl 'https://example.com/news'

    Update the URLs with SQL

    UPDATE wp_options
    SET option_value = 'https://example.com/news'
    WHERE option_name IN ('home', 'siteurl');

    The database table prefix may not be wp_, so verify the actual options table name before running the query.

    Step 6: Restrict Direct Access to Server B

    Whenever possible, Server B should accept web traffic only from Server A.

    This can be enforced with:

    • A private network
    • A cloud security group
    • nftables
    • iptables
    • UFW or another host firewall
    • Nginx access-control directives

    For example, inside the backend server block:

    allow A_SERVER_IP;
    deny all;

    Be careful to allow any monitoring services, health checks, deployment systems, or trusted administration addresses that also require access.

    A firewall rule is generally stronger than an Nginx access rule because it blocks unwanted traffic before it reaches the web server.

    Step 7: Test the Reverse Proxy

    Test the Public WordPress URL

    curl -I https://example.com/news/

    A successful response may resemble:

    HTTP/2 200
    content-type: text/html; charset=UTF-8

    Test the Missing Trailing Slash

    curl -I https://example.com/news

    The expected response is:

    HTTP/2 301
    location: /news/

    Check for Redirect Loops

    curl -IL --max-redirs 10 https://example.com/news/

    The request should eventually return a successful response instead of repeatedly redirecting between HTTP and HTTPS or between different hostnames.

    Inspect Generated WordPress URLs

    curl -s https://example.com/news/ | grep -Eo 'https?://[^"]+' | head

    Generated URLs should begin with:

    https://example.com/news/

    They should not expose:

    • The backend IP address
    • The backend hostname
    • Plain HTTP URLs
    • URLs missing the /news prefix

    Verify the Real Client IP

    On Server B, monitor the Nginx access log:

    sudo tail -f /var/log/nginx/access.log

    Access the website from another device or network. The backend log should show the real visitor IP rather than the address of Server A.

    Create a Temporary PHP Diagnostic File

    <?php
    
    header('Content-Type: text/plain');
    
    echo 'REMOTE_ADDR: ';
    echo $_SERVER['REMOTE_ADDR'] ?? 'not set';
    
    echo PHP_EOL;
    
    echo 'X-Forwarded-For: ';
    echo $_SERVER['HTTP_X_FORWARDED_FOR'] ?? 'not set';
    
    echo PHP_EOL;
    
    echo 'X-Forwarded-Proto: ';
    echo $_SERVER['HTTP_X_FORWARDED_PROTO'] ?? 'not set';
    
    echo PHP_EOL;
    
    echo 'HTTPS: ';
    echo $_SERVER['HTTPS'] ?? 'not set';

    Remove the diagnostic file immediately after testing because it exposes request and infrastructure information.

    Step 8: Troubleshoot Common Problems

    Problem: Too Many Redirects

    Common causes include:

    • WordPress does not recognize X-Forwarded-Proto
    • WP_HOME or WP_SITEURL uses HTTP
    • Server A and Server B both apply conflicting HTTPS redirects
    • A WordPress plugin forces a different hostname
    • A CDN or another proxy sends an unexpected forwarded protocol chain

    Verify that Server A sends the following headers:

    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Port $server_port;

    Then confirm that wp-config.php changes HTTPS to on only when the request comes from the trusted proxy.

    Problem: WordPress Redirects to the Backend IP

    wp option get home
    wp option get siteurl

    Both values should be:

    https://example.com/news

    Also verify that Server A preserves the public hostname:

    proxy_set_header Host $host;

    Problem: CSS, JavaScript, or Images Return 404

    Confirm that the WordPress URLs include /news and that the backend files are located under:

    /var/www/example.com/news/

    Also verify that Server A preserves the original URI:

    location /news/ {
        proxy_pass http://wordpress_backend;
    }

    Do not unintentionally strip the /news/ prefix from the upstream request.

    Problem: Backend Logs Show Server A’s IP

    Confirm that Server B contains:

    set_real_ip_from A_SERVER_IP;
    real_ip_header X-Forwarded-For;
    real_ip_recursive on;

    Then verify that Server A sends:

    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    Reload Nginx on both servers after changing the configuration.

    Problem: WordPress Login Does Not Persist

    This is usually caused by inconsistent HTTPS detection, mismatched domains, or incorrect cookie paths.

    Confirm that:

    • The public URL always uses HTTPS
    • The website does not alternate between www and non-www hostnames
    • home and siteurl include /news
    • WordPress detects HTTPS before it initializes
    • No plugin forces a conflicting login URL

    Optional: Add Nginx Proxy Caching

    Nginx proxy caching can improve performance, but WordPress pages must not be cached indiscriminately.

    Logged-in users, administrators, previews, POST requests, WooCommerce sessions, and personalized pages should bypass the cache.

    Define the Cache Zone

    Add the following directive to the http block on Server A:

    proxy_cache_path /var/cache/nginx/wordpress
        levels=1:2
        keys_zone=wordpress_cache:100m
        max_size=10g
        inactive=60m
        use_temp_path=off;

    Create Cache Bypass Variables

    map $request_method $skip_cache_method {
        default 1;
        GET  0;
        HEAD 0;
    }
    
    map $http_cookie $skip_cache_cookie {
        default 0;
        ~*wordpress_logged_in 1;
        ~*wp-postpass 1;
        ~*comment_author 1;
        ~*woocommerce_items_in_cart 1;
        ~*woocommerce_cart_hash 1;
    }

    Enable Caching for /news/

    location /news/ {
        proxy_pass http://wordpress_backend;
    
        proxy_http_version 1.1;
    
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Port $server_port;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Connection "";
    
        set $skip_cache 0;
    
        if ($skip_cache_method) {
            set $skip_cache 1;
        }
    
        if ($skip_cache_cookie) {
            set $skip_cache 1;
        }
    
        if ($request_uri ~* "^/news/(wp-admin|wp-login\.php|wp-cron\.php|wp-json/)") {
            set $skip_cache 1;
        }
    
        proxy_cache wordpress_cache;
        proxy_cache_key "$scheme$request_method$host$request_uri";
    
        proxy_cache_bypass $skip_cache;
        proxy_no_cache $skip_cache;
    
        proxy_cache_valid 200 301 302 10m;
        proxy_cache_valid 404 1m;
    
        add_header X-Proxy-Cache $upstream_cache_status always;
    }

    This is only a starting point. Websites using WooCommerce, membership systems, multilingual plugins, dynamic personalization, or authentication integrations require additional cache exclusions.

    Production Configuration Checklist

    • https://example.com/news/ loads successfully
    • /news redirects once to /news/
    • Server A preserves the original request URI
    • The original Host header reaches Server B
    • WordPress detects the forwarded HTTPS protocol
    • home and siteurl use the public HTTPS URL
    • Server B trusts forwarded IP headers only from Server A
    • Direct backend access is restricted where possible
    • WordPress login and administration pages are not cached
    • Backend IP addresses do not appear in redirects or page source
    • Nginx logs on Server B contain the real visitor IP address

    Conclusion

    A reliable WordPress reverse-proxy setup depends on consistent handling across every layer.

    Server A must preserve the public hostname, request path, protocol, and client IP chain. Server B must trust only known proxies and use the Nginx Real IP module to restore the visitor address. WordPress must recognize the forwarded HTTPS protocol and generate URLs containing the correct /news prefix.

    With these elements configured correctly, WordPress can operate securely and predictably behind Nginx while remaining publicly accessible at:

    https://example.com/news/