Guide : WebSub
WebSub (formerly PubSubHubbub) is a push protocol que broadcasts RSS/Atom feed changements to moteur de recherches comme Google in réel temps — Ce que c’est, Comment cela fonctionne, and its limites.
Langues
WebSub (formerly PubSubHubbub) is a W3C push protocol — a Recommendation since Jan 2018, republished with security fixes in June 2026 — que broadcasts RSS/Atom feed changements to moteur de recherches the moment vous publish, au lieu de waiting pour les to poll votre feed. Vous advertise a hub in votre feed (Google runs un at pubsubhubbub.appspot.com, confirmed live) and ping it on publish; the hub fans the mettre à jour out to subscribers. Google confirms it supports WebSub pour Atom/RSS. But it seulement fonctionne pour feeds — pas arbitrary pages — and it seulement speeds discovery, jamais guaranteeing a explorer or index. Pour pushing general pages, IndexNow (Bing and others) is the correct outil, pas WebSub; Bing's separate news-only PubHub stopped taking nouveau publishers in June 2025.
Evidence for this claim WebSub is a W3C publish-subscribe protocol in which publishers advertise hubs and subscribers receive content-change notifications. Scope: WebSub protocol; notification is not search indexing. Confidence: high · Verified: W3C Recommendation: WebSub Evidence for this claim WebSub has no standardized guarantee of search-engine crawling or indexing; search push protocols such as IndexNow have separate participants and semantics. Scope: Distinction between feed subscription and IndexNow URL notification. Confidence: high · Verified: IndexNow protocol documentationTL;DR — WebSub is a façon to notify subscribers quand vous publish something, au lieu de waiting pour les to come vérifier votre feed. It seulement fonctionne si votre site has an RSS or Atom feed. Vous point votre feed at a “hub,” and quand vous publish, votre site pings the hub, qui passes the mettre à jour to subscribed services. Some blogging platforms prise en charge ce automatically.
Ce que WebSub is
Normally, moteur de recherches trouver votre nouveau posts by coming back to regarder — ils re-read votre sitemap or votre RSS feed every so souvent on leur propre schedule. WebSub flips que autour: the moment vous hit publish, votre site sends a little “hey, I’ve got something nouveau” message, and que obtient relayed to the moteur de recherches que are listening.
It utilisé to be appelé PubSubHubbub (yes, really). In 2017 it was renamed WebSub and became an official web standard. Les deux noms mean the même chose, and Google’s system encore fonctionne sous soit un.
The un chose to know
WebSub seulement fonctionne with RSS or Atom feeds. It is pas a façon to push quelconque random page on votre site to Google. Si vous vouloir to ping moteur de recherches à propos de a normal page que isn’t in a feed, that’s a différent outil (IndexNow pour Bing; the Inspection d’URL outil pour Google).
And comme everything in discovery, WebSub seulement helps a moteur de recherche trouver out à propos de votre content faster. It doesn’t guarantee lune page obtient crawled, indexé, or ranked — ceux are encore separate steps.
Do vous devez définir it up?
Probably pas by hand. Si vous publish on WordPress (with a plugin), Blogger, or la plupart hosted platforms, WebSub is soit construit in or un plugin away, déjà pointed at Google’s public hub. It’s a nice-to-have pour sites que publish souvent — pas a must-do pour everyone.
Vouloir the protocol details, Google’s exact stance, and how WebSub compares to IndexNow? Switch to the Avancé tab.
Evidence for this claim WebSub is a W3C publish-subscribe protocol in which publishers advertise hubs and subscribers receive content-change notifications. Scope: WebSub protocol; notification is not search indexing. Confidence: high · Verified: W3C Recommendation: WebSub Evidence for this claim WebSub has no standardized guarantee of search-engine crawling or indexing; search push protocols such as IndexNow have separate participants and semantics. Scope: Distinction between feed subscription and IndexNow URL notification. Confidence: high · Verified: IndexNow protocol documentationTL;DR — WebSub (formerly PubSubHubbub; a W3C Recommendation since January 2018, reaffirmed with a security-focused mettre à jour in June 2026) is the push complement to RSS/Atom’s pull. A publisher advertises a hub in its feed (
<link rel="hub">), subscribers register with que hub, and on publish the publisher pings the hub so it fans the mis à jour feed out to every subscriber. Search services peut subscribe, but WebSub itself rend aucun promise que quelconque search engine va explorer or index une URL. It is designed autour topic resources tel as feeds, pas as a general indexation API. Pour participating moteur de recherches, IndexNow is a separate URL-notification protocol — and as of mid-2025, Bing has aussi stopped taking nouveau sign-ups pour its propre news-feed submission program (plus ci-dessous), qui narrows the field plus loin.
WebSub is the push half of feeds
In the Discovery hub I split discovery into pull and push. RSS/Atom feeds are a pull channel: the engine polls votre feed on its propre cadence (Google’s Feedfetcher, pour instance, won’t pull la plupart feeds plus que à propos de une fois an hour). WebSub is ce que turns que pull into a push — au lieu de waiting to be re-fetched, votre feed broadcasts the modifier the moment vous publish.
That’s the whole valeur proposition: near-real-time notification of feed updates, plutôt que waiting pour the suivant scheduled poll.
PubSubHubbub vs WebSub — même protocol, différent nom
Ce trips personnes up in documentation searches. The protocol was originally appelé PubSubHubbub (abbreviated PSH). It was renamed WebSub in October 2017 and publié as a W3C Recommendation in January 2018. Pre-2018 articles dire “PubSubHubbub”; post-2018 articles dire “WebSub.” They’re the même chose, and Google’s hub encore réponses to les deux — qui John Mueller confirmed at the temps of the rename (“Yes, finally dug it up! We support both.”).
The spec itself hasn’t stood encore since 2018, soit: the W3C republished WebSub as a nouveau Recommendation on 2 June 2026, ajout cross-site-scripting (XSS) mitigations to the Security Considerations section. That’s a security-hardening mettre à jour, pas a mechanics modifier — the actors, discovery relations, and subscribe/ publish flow décrit ci-dessous are the même protocol as the 2018 version. Si you’re implementing (pas simplement consuming) WebSub, lire the current Recommendation plutôt que a copy of the 2018 text.
How WebSub en réalité fonctionne
Là are three actors:
- Publisher — votre site (specifically, votre feed).
- Hub — a relay server que handles subscriptions and fan-out.
- Subscriber — a moteur de recherche (or quelconque client) que veut updates.
The W3C spec frames the flow plainly: “Subscribers découvrir the hub of a topic URL, and rend a POST to un or plus of the advertised hubs in order to recevoir updates quand the topic changements. Publishers notify leur hub(s) URLs quand leur topic(s) modifier. Quand the hub identifies a modifier in the topic, it sends a content distribution notification to tout registered subscribers.”
Evidence for this claim WebSub is a W3C publish-subscribe protocol in which publishers advertise hubs and subscribers receive content-change notifications. Scope: WebSub protocol; notification is not search indexing. Confidence: high · Verified: W3C Recommendation: WebSubEn pratique, pour le SEO:
- Votre feed advertises a hub with a
<link rel="hub" href="...">tag (plus a<link rel="self" href="...">pointing at the feed’s propre URL). - Subscribers (moteur de recherches) register with que hub pour votre feed.
- Quand vous publish, votre site notifies the hub que votre feed modifié.
- The hub récupère votre mis à jour feed and fans it out to every subscriber via an HTTP POST to leur callback URL.
Step 2 is doing plus fonctionner que “register” implies. The spec breaks subscription into separate states: a subscription requête, a verification step où the hub confirms the subscriber en réalité veut the topic (so nobody peut subscribe a stranger’s callback URL sans leur say-so), a lease the subscription holds pour a bounded temps, and a renewal the subscriber has to faire avant que lease expires (there’s aucun tel chose as a permanent subscription) — plus an explicit unsubscribe chemin. None of que is something vous, as the publisher, manage; it’s the hub-and-subscriber side of the handshake. But it’s worth knowing it exists, parce que it’s pourquoi “I pinged the hub” and “a moteur de recherche has an active subscription to my feed” are two différent, independently-failable choses.
Step 3 is aussi moins standardized que la plupart WebSub write-ups let on: the spec itself
dit “the spécifique mechanism pour the publisher to inform the hub is left
unspecified,” and seulement notes, as an exemple, que some public hubs — notamment
Google’s — accept a POST with hub.mode=publish and hub.url définir to the modifié
feed. Que convention is universal suffisant En pratique que “ping the hub” and “POST
hub.mode=publish” are effectively synonyms — but it’s a widely-adopted convention
documented as an exemple, pas a hard requirement of the Recommendation.
The W3C spec is technically broader que feeds — it peut carry quelconque HTTP resource — but Google’s documentation scopes its recommendation to Atom/RSS feeds. The spec is wide; the SEO utiliser cas is narrow.
WebSub and Google
Google’s prise en charge is on the record, in the Construire a Sitemap docs: “Si vous utiliser Atom or RSS, vous pouvez utiliser WebSub to broadcast votre changements to moteur de recherches, notamment Google.” It’s a unique subordinate sentence — Google doesn’t give WebSub its propre section — but it’s confirmed.
Google’s hub is at pubsubhubbub.appspot.com, run by Google as a service — I
confirmed it’s encore live and answering as of 2026-07-18. That’s the hub vous
advertise in votre feed and ping on publish. Community hubs exist aussi, but they’ve
historically been moins durable que Google’s — vérifier que quelconque third-party hub you’re
considering is en réalité encore responding avant vous commit votre feed to it, plutôt
que trusting an old blog post que dit it fonctionne.
The robot d’exploration behind the curtain is Feedfetcher (Feedfetcher-Google), qui is
how Google crawls RSS/Atom feeds pour Google News and WebSub. Un important nuance from
Feedfetcher’s propre docs: “only podcast feeds get indexed in Google Search” via
que chemin. So pour a normal blog feed, WebSub accelerates Google’s awareness of the
feed mettre à jour, but the réel indexation of chaque page encore comes from Googlebot suivant
l’URLs à l’intérieur the feed via the normal explorer → index pipeline. WebSub is a
discovery accelerant, pas an indexation shortcut.
WebSub and Bing
Bing’s documented WebSub-style prise en charge has lived sous Bing News PubHub — i.e., it’s news/feed-scoped, parallel to how Google’s Feedfetcher chemin is oriented toward News and podcasts. But PubHub itself is winding bas: Microsoft stopped accepting nouveau publisher applications to PubHub in June 2025, saying it’s moving Bing News toward automatically identifying and ranking eligible news content au lieu de manual submissions. Publishers déjà approved avant alors stay indexé; the submission portal pour nouveau applicants is closed. That’s a program-level retirement of manual news submission, pas a modifier to IndexNow.
Pour pushing general web pages to Bing, the correct outil is IndexNow, pas WebSub or PubHub. IndexNow is Bing’s (and Yandex’s, Naver’s, Seznam’s, Yep’s) preferred real-time push pour arbitrary URLs, unaffected by the PubHub modifier — and notably, Google fait pas participate in IndexNow (confirmed on indexnow.org’s propre participant liste as of ce examiner). So the clean split is: WebSub pour feeds (où Google’s hub is the practical option), IndexNow pour general pages on the engines que prise en charge it.
How to implement WebSub
Step 1 — advertise the hub in votre feed. Ajouter a hub lien and a self lien. The la plupart courant formulaire is embedded in the feed itself:
<link rel="hub" href="https://pubsubhubbub.appspot.com/" />
<link rel="self" href="https://example.com/feed.xml" />Google’s hub aussi accepts the equivalent as HTTP réponse headers on the feed requête au lieu de embedded tags — utile si vous don’t contrôler the feed’s XML directement (a third-party feed generator, pour instance):
Link: <https://pubsubhubbub.appspot.com/>; rel="hub"
Link: <https://example.com/feed.xml>; rel="self"Soit formulaire indique a subscriber the même chose: qui hub to register with, and ce que ce feed’s propre URL canonique is. Que second partie matters si vous ever déplacer the feed — point the old URL at the nouveau un with an HTTP redirection and, per the spec, a subscriber renewing its lease va follow the redirection and pick up the nouveau hub/self pair automatically, plutôt que silently going stale.
Step 2 — ping the hub quand vous publish. POST to the hub URL with the publish mode and votre feed URL — ce is the widely-used convention Google’s hub (and la plupart others) expect, décrit ci-dessus:
curl -i -d "hub.mode=publish&hub.url=https://example.com/feed.xml" \
https://pubsubhubbub.appspot.com/En pratique, votre CMS handles les deux steps. WordPress’s PubSubHubbub plugin uses Google’s hub by par défaut; Blogger, WordPress.com, and Medium prise en charge WebSub natively. Pour a custom site, vous wire the publish-ping into votre publishing flow.
Vérifier — but know ce que you’re en réalité confirming. A 2xx from the hub seulement
proves the hub accepted votre notification; it doesn’t prove quelconque subscriber reçu
it, and as the publisher vous généralement can’t observe que dernier hop directement. Ce que vous
peut vérifier from votre propre side: publish a tester post, confirmer the hub renvoie a 2xx
to votre ping, alors watch pour Feedfetcher-Google hitting votre feed in votre serveur
logs shortly après — que confirms the hub re-fetched, qui is as far as publisher-side
verification goes. Voir the Validation Tests lens pour the complet staged breakdown
(feed markup, ping réponse, hub re-fetch) with ce que chaque un fait and doesn’t prove.
Ce que WebSub is pas
A few myths worth killing:
- It ne fait pas index pages instantly. It notifies the hub of a feed mettre à jour; Google encore crawls and indexes chaque URL via normal processes.
- It ne fait pas fonctionner pour arbitrary pages. Feeds seulement. Pour non-feed URLs, that’s IndexNow (Bing) or Inspection d’URL (Google).
- It ne fait pas replace sitemaps. WebSub and sitemaps are complementary — sitemaps cover the whole site; WebSub pushes real-time feed changements. Google recommends les deux.
- Google’s hub n’est pas deprecated.
pubsubhubbub.appspot.comis active and run by Google — confirmed live as of 2026-07-18. Bing’s PubHub is a différent story: it stopped taking nouveau publisher applications in June 2025 (voir WebSub and Bing ci-dessus), so don’t treat que page as an onboarding chemin anymore même though it encore exists.
Who en réalité benefits
High-frequency publishers — news sites, podcasts, and anyone whose freshness window matters — obtenir the la plupart out of WebSub. Pour a site que publishes a few times a month, the marginal speed-up over normal feed polling and bon maillage interne is petit. It’s a sensible par défaut si votre platform offers it; it’s rarely worth heavy custom engineering on its propre.
Pour the broader picture of how URLs obtenir trouvé, voir the Discovery hub; pour ce que se produit après a URL is découvert, voir Exploration.
AI summary
A condensed prendre on the Avancé version:
- WebSub = the push half of RSS/Atom. Feeds are normally pulled on the engine’s schedule; WebSub broadcasts the modifier the moment vous publish.
- Formerly PubSubHubbub (PSH); renamed October 2017, W3C Recommendation January 2018 — republished June 2026 with XSS security mitigations ajouté, même protocol mechanics. Google supports les deux noms (John Mueller: “We support both.”).
- Three actors: publisher → hub → subscribers. Vous advertise a hub in votre feed
(
<link rel="hub">+<link rel="self">, or the equivalent HTTPLinkheaders), alors notify the hub on publish (Google’s hub and la plupart others utiliser ahub.mode=publishPOST — a documented convention, pas a spec requirement); the hub fans the feed out to subscribers, chaque of qui held a separately-verified, time-limited, renewable subscription. - Google supports it: “Si vous utiliser Atom or RSS, vous pouvez utiliser WebSub to broadcast
votre changements to moteur de recherches, notamment Google.” Google’s hub:
pubsubhubbub.appspot.com(confirmed live 2026-07-18). Feedfetcher fait the explorer; remarque “only podcast feeds get indexed in Google Search” via que chemin. - Two hard limites: feeds seulement (pas arbitrary pages), and discovery seulement (aucun guaranteed explorer or index). A successful hub ping aussi isn’t proof of subscriber delivery — vous pouvez seulement vérifier as far as the hub’s propre re-fetch.
- Bing: WebSub-style prise en charge lived sous news-scoped PubHub, qui stopped taking nouveau publisher sign-ups in June 2025. Pour general pages, IndexNow is Bing’s push, unaffected by que (Google doesn’t participate in IndexNow).
- Doesn’t replace sitemaps; isn’t instant indexation. La plupart CMSes (WordPress plugin, Blogger, Medium) handle it automatically. Meilleur pour high-frequency publishers.
Documentation officielle
Primary-source documentation and the protocol spec.
- Construire and submit a sitemap — the un placer Google documents WebSub: “If you use Atom or RSS, you can use WebSub to broadcast your changes to search engines, including Google.”
- Feedfetcher — the robot d’exploration behind WebSub-triggered récupère; notes que seulement podcast feeds obtenir indexé dans la recherche Google via ce chemin.
- Google’s WebSub hub — the live, Google-run public hub vous advertise and ping.
- En utilisant RSS/Atom feeds to découvrir nouveau URLs (2009) — the seminal Search Central post introducing Google’s PubSubHubbub prise en charge.
Bing / Microsoft
- Bing News PubHub prise en charge — Bing’s feed/news-scoped guidance; lune page encore exists, but Microsoft stopped accepting nouveau PubHub publisher applications in June 2025.
- IndexNow / indexnow.org — Bing’s preferred real-time push pour general (non-feed) URLs, unaffected by the PubHub modifier.
Standard
- WebSub — W3C Recommendation — the protocol spec, a W3C Recommendation since January 2018 and republished 2 June 2026 with Security Considerations XSS mitigations: hubs, subscribers, publishers, and content distribution.
Quotes from the source
On-the-record statements from Google and the W3C spec. Chaque lien is a deep lien que jumps to the quoted passage on the source page.
Google — WebSub prise en charge
- “If you use Atom or RSS, you can use WebSub to broadcast your changes to search engines, including Google.” — Recherche Google Central, Construire a Sitemap. Jump to quote
- “Google accepts RSS 2.0 and Atom 1.0 feeds.” Jump to quote
Google — Feedfetcher (the robot d’exploration behind WebSub)
- “Feedfetcher is how Google crawls RSS or Atom feeds for Google News and WebSub.” — Google robots d’exploration and fetchers docs. Jump to quote
W3C — how the protocol fonctionne
- “Subscribers discover the hub of a topic URL, and makes a POST to one or more of the advertised hubs in order to receive updates when the topic changes. Publishers notify their hub(s) URLs when their topic(s) change. When the hub identifies a change in the topic, it sends a content distribution notification to all registered subscribers.” — W3C WebSub Recommendation. Jump to quote
John Mueller, Google (on the PubSubHubbub → WebSub rename, September 2017)
- “Yes, finally dug it up! We support both.” — confirming Google supports les deux the “WebSub” and the précédent “PubSubHubbub” noms. Relayed via Moteur de recherche Roundtable’s September 2017 coverage; the original tweet is ne … plus directement accessible, so treat ce as attributed plutôt que verbatim-from-source.
WebSub publishing checklist
- Publish a valid RSS or Atom feed with a stable public URL.
- Ajouter les deux the hub relation and the feed’s self relation to the feed markup.
- Send the modifié feed URL to the advertised hub après publishing or updating an item.
- Confirmer the hub accepted la requête, alors confirmer it récupéré the feed from votre logs.
- Garder the feed reachable sans authentication and retourner a normal success réponse.
- Treat the ping as a discovery notification, pas proof of exploration, indexation, or ranking.
The publish → notify → récupérer framework
Think of WebSub as a three-party handoff:
- Publisher: updates the feed and indique its advertised hub qui feed modifié.
- Hub: accepts the notification and fans it out to subscribers.
- Subscriber: receives the notification and decides si to récupérer the feed.
Chaque boundary nécessite separate evidence. A successful publish ping proves seulement que the hub accepted the notification. A server-log requête from the hub proves the feed was récupéré. Neither proves que a moteur de recherche crawled an item URL or ajouté it to an index. Que separation garde discovery échecs from being misdiagnosed as indexation échecs.
WebSub — Référence rapide
Requis feed markup (les deux elements, in the feed’s <head>/channel-level tags)
| Element | Objectif |
|---|---|
<link rel="hub" href="..."> | Points at the hub que fans out updates pour ce feed. |
<link rel="self" href="..."> | Declares the feed’s propre URL canonique — the hub uses ce to confirmer qui topic you’re pinging à propos de. |
The publish ping
| Field | Valeur |
|---|---|
| Méthode | POST |
| Endpoint | The hub URL (Google’s: https://pubsubhubbub.appspot.com/) |
| Content-Type | application/x-www-form-urlencoded |
| Corps | hub.mode=publish&hub.url=<your-feed-url> |
| Success réponse | 204 No Content or 202 Accepted |
hub.mode valeurs
publish— the valeur a publisher sends, by convention (Google’s hub and la plupart others utiliser it; the spec itself leaves the publisher-notification mechanism unspecified). Indique the hub “this topic changed, go re-fetch it.”subscribe/unsubscribe— ces ARE spec-defined (W3C Recommendation, hub.mode requis parameter), utilisé by subscribers registering or deregistering pour a topic’s updates, chaque requiring hub verification and a renewable lease. Moteur de recherches handle ce on leur propre fin; vous don’t send it.
Fast facts
- Google’s public hub:
pubsubhubbub.appspot.com— confirmed live 2026-07-18. - WebSub fonctionne on feeds seulement (RSS/Atom) — pas arbitrary pages.
- Pour general (non-feed) URLs on engines que prise en charge real-time push, that’s IndexNow, pas WebSub. Bing’s separate PubHub news-submission program stopped taking nouveau sign-ups in June 2025.
- Renamed from PubSubHubbub to WebSub in October 2017; W3C Recommendation since January 2018, republished 2 June 2026 with security-only mitigations. Même protocol, les deux noms encore fonctionner contre Google’s hub.
Mistakes que quietly break WebSub
Advertising the hub but pas the rel="self" lien. The hub nécessite les deux tags —
rel="hub" to know où to send subscribers, rel="self" to confirmer exactly
qui feed URL votre ping refers to. Ship seulement the hub lien and some hub
implementations can’t reliably match votre ping to votre feed.
Pinging with the incorrect hub.url. The valeur has to be the feed’s propre URL
(the même un in votre rel="self" lien) — pas le site’s homepage, pas an
individual post URL, pas une URL with tracking parameters appended. A mismatched
hub.url signifie the hub can’t vérifier the topic and the ping ne fait pashing.
Expecting WebSub to replace sitemaps. A sitemap is votre comprehensive map of the whole site; WebSub seulement ever broadcasts changements to a feed vous déjà advertised. Drop le sitemap and vous lose the engine’s map of everything que isn’t in que feed.
Expecting a ping to mean “indexed.” A successful 2xx from the hub seulement
signifie the hub accepted votre notification and va re-fetch the feed. It dit
nothing à propos de si Google (or anyone sinon) crawled, rendered, or indexé
lune pages the feed liens to — ceux are separate pipeline stages.
Trying to utiliser WebSub pour pages que aren’t in a feed. WebSub seulement covers whatever’s à l’intérieur the feed vous pinged à propos de. Pour a one-off page mettre à jour outside quelconque feed, WebSub has nothing to offer — that’s IndexNow (Bing and others) or Google’s Inspection d’URL outil.
Silently trusting que every ping succeeded. Publish pipelines que fire the ping and jamais vérifier la réponse peut go months with a broken integration (incorrect hub URL après a migration, a firewall rule blocking outbound POSTs) avant anyone notices feed updates stopped propagating. Voir Validation Tests pour ce que to en réalité vérifier.
Running votre propre hub sans callback and delivery hardening. La plupart publishers jamais besoin ce — Google’s hub or votre CMS’s built-in un covers the SEO utiliser cas. But si vous do stand up votre propre hub (an internal syndication outil, Par exemple), the spec’s Security Considerations flag réel risks a naive implementation misses: a hub que blindly récupère or POSTs to whatever URL a client hands it is exposed to server-side requête forgery (fetching internal/private addresses), so validate and restrict callback and topic URLs the façon OWASP’s SSRF guidance describes. And don’t promise subscribers exactly-once delivery — HTTP retries mean a callback peut recevoir the même content distribution plus que une fois, so a subscriber-side implementation nécessite to treat delivery as at-least-once and dedupe/traiter idempotently, pas assume a unique clean POST per mettre à jour.
Ping the hub and confirmer it worked
Bash / curl — ping with visible code d’état
curl -s -o /dev/null -w "%{http_code}\n" \
-d "hub.mode=publish&hub.url=https://example.com/feed.xml" \
https://pubsubhubbub.appspot.com/A 204 or 202 printed back signifie the hub accepted the notification. Anything
sinon (a 4xx/5xx, or a connection échec) signifie the ping didn’t land — vérifier
the hub URL and votre feed’s hub.url valeur avant assuming it worked.
Python — même ping, pour wiring into a publish hook
import requests
HUB_URL = "https://pubsubhubbub.appspot.com/"
FEED_URL = "https://example.com/feed.xml"
response = requests.post(
HUB_URL,
data={"hub.mode": "publish", "hub.url": FEED_URL},
timeout=10,
)
if response.status_code in (202, 204):
print(f"WebSub ping accepted ({response.status_code})")
else:
print(f"WebSub ping failed: {response.status_code} {response.text}")Appel ce correct après votre CMS or static-site construire publishes a nouveau post — the même moment you’d regenerate the feed itself. It’s safe to appel on every publish; re-pinging an unchanged feed doesn’t hurt anything, it simplement indique the hub to re-check.
Prove WebSub en réalité fired
Réussir/échouer checks pour après vous wire up the hub lien and the publish ping. Ces are staged deliberately: chaque un seulement proves its propre step in the publisher → hub → subscriber chain, and the dernier hop — the hub en réalité delivering to a subscriber, and que subscriber acting on it — se produit outside votre logs entirely. A publisher peut vérifier the premier two stages directement and infer the third from the hub’s propre re-fetch; nothing ici (or anywhere in WebSub) lets a publisher confirmer a spécifique subscriber reçu or processed an mettre à jour.
Tester: feed advertises the hub and itself
- Tester to run: View source on votre feed URL and regarder pour les deux
<link rel="hub" href="...">and<link rel="self" href="...">at the channel/feed level. - Attendu result: Les deux tags présent, with
rel="self"matching the exact URL vous récupérer the feed at. - Échec interpretation: Manquant
rel="hub"signifie there’s aucun hub to ping in the premier placer; manquant or mismatchedrel="self"signifie the hub can’t reliably confirmer qui topic a ping refers to. - Monitoring window: Immediate — vérifier correct après quelconque feed template modifier.
- Rollback trigger: Soit tag manquant or
rel="self"pointing at a différent URL que the un moteur de recherches en réalité récupérer.
Tester: the publish ping renvoie a success status
- Tester to run: Send a ping (voir the Scripts lens) and lire the HTTP code d’état back.
- Attendu result:
204 No Contentor202 Accepted. - Échec interpretation: A
4xxusually signifie a malformed requête (badhub.mode/hub.urlvaleurs) or ahub.urlthe hub doesn’t recognize as yours; a5xxor timeout signifie the hub itself is unreachable — retry avant assuming a permanent échec. - Monitoring window: Immediate — every temps votre publish flow fires a ping.
- Rollback trigger: Repeated non-
2xxréponses à travers multiple publishes — that’s a broken integration, pas a one-off blip.
Tester: the hub en réalité re-fetched the feed
- Tester to run: Vérifier votre serveur logs pour a
Feedfetcher-Google(or votre hub’s) requête contre the feed URL shortly après a successful ping. - Attendu result: A récupérer requête contre the feed URL dans roughly a few minutes of the ping.
- Échec interpretation: A
2xxping with aucun follow-up récupérer in the logs suggests the hub accepted la requête but couldn’t resolve or reach votre feed — worth confirming the feed URL is publicly reachable and pas blocked byrobots.txtor a firewall. - Monitoring window: Dans an hour of a tester publish; ce is the slowest-moving of ces checks since it dépend on the hub’s propre récupérer schedule.
- Rollback trigger: Aucun récupérer apparaît après several successful-looking pings in a row — treat the hub relationship as unverified jusqu’à logs confirmer it.
Testez vos connaissances: WebSub
Five rapide questions on ce que WebSub is, Comment cela fonctionne, and où its limites are. Pick an réponse pour chaque, alors vérifier.
Journal des modifications
Mis à jour le 18 juil. 2026.
Résumé éditorial et détails enregistrés des changements.Détails des changements
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
Comparaison complète indisponible — aucun instantané antérieur n’a été archivé pour cette révision.