Webmention is a standard for communication across sites on the web1, enabling a peer-to-peer network of comments, likes, etc.
How it works
A webmention enables site T to inform site S when it mentions one of its posts. That is, when a site T references content from a site S, it can choose to inform site S of this reference along with any new content, often interpreted as a response/comment to the original post from site S. In practice, this process unfolds as follows:
- A location to send webmentions is indentified, as indicated by site S’s webmention link tag of the form
<link rel="webmention" href=<webmention receiver> />.
- A message is sent to the identified receiving server (from site T to site S) following the webmention protocol, including details like its own URL, the response content, etc.
- The receiving server (hosted by site S) receives the webmention, parses it, and (usually) stores it. The webmention is now available to site S to display, track, process, etc e.g. as a comment on the original post.
Overall this process is fairly straightforward, and following the protocol is relatively simple. The main hurdle is that both sites involved must support webmentions; site T’s comment has nowhere to go if site S isn’t listening, and site S can’t receive comments if commenters don’t send them. This is also the power of webmentions: as long as both parties of a conversation support a simple protocol, communication doesn’t have to fall under a centralized platform. Unfortunately, most of today’s conversation does fall under large centralized platforms like Facebook, Twitter, etc and most of these sites do not support webmentions. Here’s where a service like brid.gy comes into play, acting on behalf of the social media site (where you’d like to monitor comments on posts involving links to your site) to send you relevant webmentions. It does this by watching enabled platforms (like Twitter and Facebook) through their exposed APIs and sends you a webmention when it finds content that references your site.
To further ease the complexity of implementing webmentions, services like
webmention.io provide a free webmention endpoint for your website. In essence they do they hard work of receiving and storing webmentions that get sent to your site. They then offer an easy API for querying the stored responses for downstream tasks like displaying them on your site.
I’ve implemented a basic webmention system for this site, displaying received mentions as comments on their respective posts. You can find these by clicking the “page details” button to reveal the metadata sidebar (although this may change at some point in the future). I’m currently making use of brid.gy to watch Twitter and Github for posts including links to samgriesemer.com, and webmention.io as a receiver and API for pulling mentions into displayed comments.
See indieweb docs↩︎