Bridgy Fed
connects your web site
to Mastodon and the
fediverse.
Learn more...
Bridgy Fed turns your web site into its own fediverse account, visible in Mastodon and beyond. You can post, reply, like, repost, and follow fediverse accounts by posting on your site with microformats2 and sending webmentions. Bridgy Fed translates those posts to fediverse protocols like ActivityPub and OStatus, and sends fediverse interactions back to your site as webmentions.
This isn't syndication or POSSE! You don't need an account on Mastodon or anywhere else. Bridgy Fed lets your site act like a first class member of the fediverse. People there will see your posts directly from your site, and vice versa.
Bridgy Fed takes some technical know-how to set up, and there are simpler (but less powerful) alternatives. If you just want your site's posts to show up in the fediverse, without any other interactions, consider an RSS or Atom feed bot instead. Or, if you want to cross-post to an existing Mastodon account, try Bridgy.
- How do I set it up?
- How do I set up my profile?
- Where's my user page and dashboard?
- How do I post to the fediverse?
- Which of my posts will show up in the fediverse?
- How does it decide which parts of my posts to include?
- What's up with the visible fed.brid.gy links in my fediverse posts?
- How do I reply to a fediverse post?
- How do I favorite (aka like) or boost (aka repost) a fediverse post?
- How do I follow someone?
- How do I include an image in a post?
- How do I edit an existing post?
- Can I publish just one part of a page?
- How do fediverse replies, likes, and other interactions show up on my site?
- How do I read my fediverse timeline/feed?
- How can people on the fediverse find and follow me?
- I tried it, and it didn't work!
- Who are you? Why did you make this?
- How much does it cost?
- What do you do with my data?
- How long has this been around?
- What are the terms of service?
- I found a bug! I have a feature request!
- I found a security vulnerability!
Setup
Usage
About
- How do I set it up?
-
- Your site needs to support SSL. Bridgy Fed uses your domain as your identity, so it depends on SSL to prove that you own it.
- Configure your site to redirect these URL paths to the same paths on
https://fed.brid.gy/
, including query parameters: -
WordPress (self-hosted): install the Safe Redirect Manager plugin, then add these entries:
/.well-known/host-meta* => https://fed.brid.gy/.well-known/host-meta*
/.well-known/webfinger* => https://fed.brid.gy/.well-known/webfinger* - Known or Drupal: follow the Apache or nginx instructions below.
- Apache: add this to your
.htaccess
file:
RewriteEngine on RewriteBase / RewriteRule ^.well-known/(host-meta|webfinger).* https://fed.brid.gy/$0 [redirect=302,last]
(RewriteEngine on
is optional if you already have it earlier in your.htaccess
.RewriteBase /
is optional if you don't have any otherRewriteBase
directives, or if you put thisRewriteRule
inside an existingRewriteBase /
section.) - nginx: add this to your
nginx.conf
file, in theserver
section:
rewrite ^/\.well-known/(host-meta|webfinger).* https://fed.brid.gy$request_uri? redirect;
- Netlify: add this to your
netlify.toml
file.[[redirects]] from = "/.well-known/host-meta*" to = "https://fed.brid.gy/.well-known/host-meta:splat" status = 302 [[redirects]] from = "/.well-known/webfinger*" to = "https://fed.brid.gy/.well-known/webfinger" status = 302
- Add webmention support to your site. This is strongly recommended, but technically optional. You don't have to automate the webmentions to Bridgy Fed to federate your posts, and you don't have to accept the inbound webmentions that Bridgy Fed sends, but you'll have a much better experience if you do. Check out the IndieWeb wiki for instructions for your web server.
/.well-known/host-meta /.well-known/webfinger
Here are instructions for a few common web servers:
- How do I set up my profile?
-
Your site's fediverse profile comes from the microformats2 representative h-card on your site's home page. Here's a minimal example to set your name and a profile picture:
<span class="h-card"> <a rel="me" href="/">Alice Foo</a> <img class="u-photo" src="/me.jpg" /> </span>
If you want to set a header image, add a
u-featured
image to your h-card, eg:<img class="u-featured" src="/my-header.png" />
By default, your fediverse address will be
@yourdomain.com@yourdomain.com
. Many services (eg Mastodon) default to only showing the username, so this generally shows up as just@yourdomain.com
in posts, and the full address appears on hover.We recommend this for simplicity and predictability, for everyone else as well as you, but if you want a different username, you can set it by adding an
acct:
u-url link inside your h-card withusername@yourdomain.com
, eg:<a class="u-url" href="acct:alice@yourdomain.com"></a>
- Where's my user page and dashboard?
-
Enter your domain here to see your user page. It shows your site's current status, recent interactions, remote follow UI, and links to your timeline feeds in various formats.
- How do I post to the fediverse?
-
Create a post with the
h-entry
microformat on your web site. Many web servers include this or compatible microformats automatically. The post can be a note, article, like, repost, reply, or follow. For example:<div class="h-entry"> <p class="e-content">Two naked tags walk into a bar. The bartender exclaims, "Hey, you can't come in here without microformats, this is a classy joint!"</p> <a class="u-bridgy-fed" href="https://fed.brid.gy/"></a> </div>
Basic HTML formatting like links, bold, and italics are generally preserved and visible in the fediverse, but specifics vary from site to site.
Then, include a link (optionally blank) to
https://fed.brid.gy/
in that post and send Bridgy Fed a webmention. That webmention will trigger Bridgy Fed to forward your post into the fediverse. Your web server may send the webmention automatically if it supports them, or you can send it manually.(The
u-bridgy-fed
class isn't strictly necessary, but it's useful in some cases to prevent microformats2 parsers from interpreting the link as an impliedu-url
.) - Which of my posts will show up in the fediverse?
-
Only the ones you explicitly trigger with a webmention. Bridgy Fed doesn't automatically create posts in the fediverse based on your site's Atom feed, HTML, or anything else. It only create posts in the fediverse on an opt in basis, per post, via webmention.
- How does it decide which parts of my posts to include?
-
Magic! Most major blog engines and CMSes are supported out of the box, no setup necessary. Bridgy Fed looks for microformats in your HTML, first the microformats2
e-content
class and then the legacyentry-content
class. It also understands more advanced microformats2 classes likein-reply-to
,u-like-of
,u-repost-of
, andu-photo
.Bridgy Fed sends the full contents of all posts, specifically everything inside
e-content
, to the fediverse. However, not all fediverse apps currently show the full contents of all posts.For example, text-based posts fall into two broad buckets: short notes, eg tweets and toots, and longer articles, eg blog posts. In the IndieWeb, we differentiate based on whether the post has a title: articles generally have titles, notes don't.
Mastodon currently shows the full text of notes, but for articles, it only shows their titles and a link to the full article. This is because Mastodon and most other fediverse apps are designed primarily for smaller notes, not longer articles.
- What's up with the visible fed.brid.gy links in my fediverse posts?
-
These can happen for a couple reasons. For articles, this is expected behavior, as described above. The link is a Bridgy Fed URL that redirects to the original post on your web site. This is because Mastodon requires ActivityPub (ie fediverse) object URLs to use the same domain that serves them, which in this case is fed.brid.gy. We know it's awkward; sorry for the ugliness!
Otherwise, this may be the invisible fed.brid.gy link that's required to trigger Bridgy Fed. If you put it outside of your post's
e-content
, it won't show up in the fediverse post. It can go anywhere in your HTML! - How do I reply to a fediverse post?
-
Put the reply in a new post on your web site, and include a link to the fediverse post you're replying to with class
u-in-reply-to
, as if you were publishing a normal IndieWeb reply. For example:<div class="h-entry"> <p class="e-content">Highly entertaining. Please subscribe me to your newsletter.</p> <a class="u-in-reply-to" href="https://indieweb.social/@tchambers/109243684867780200"></a> <a class="u-bridgy-fed" href="https://fed.brid.gy/"></a> </div>
- How do I favorite (aka like) or boost (aka repost) a fediverse post?
-
Favoriting and boosting are almost exactly the same as replying. The only difference is that you use
u-like-of
for a favorite/like oru-repost-of
for a boost/repost.<a class="u-like-of" href="https://octodon.social/@cwebber/109405439825087368"></a>
<a class="u-repost-of" href="https://prodromou.pub/@evan/109390803478257847"></a>
- How do I follow someone?
-
Post an IndieWeb follow on your site with
u-follow-of
microformats2, then send a webmention to Bridgy Fed. Your site may do that automatically if it supports webmentions. For example:<div class="h-entry"> I'm now following <a class="u-follow-of" href="https://octodon.social/@cwebber">@cwebber@octodon.social</a>! <a class="u-bridgy-fed" href="https://fed.brid.gy/"></a> </div>
- How do I include an image in a post?
-
Use
<img class="u-photo">
for the image in your post. For example:<img class="u-photo" src="/full_glass.jpg" /> I love scotch. Scotchy scotchy scotch.
- How do I edit an existing post?
-
Edit the post on your web site, then send another webmention to Bridgy Fed for it. Bridgy Fed will refetch the post and send an
Update
activity for it to the fediverse. - Can I publish just one part of a page?
-
If that HTML element has its own id, then sure! Just put the id in the fragment of the URL that you publish. For example, to publish the
bar
post here:<div id="a" class="h-entry">foo</div> <div id="b" class="h-entry">bar</div> <div id="c" class="h-entry">baz</div>
...just add the id to your page's URL in a fragment, e.g.
http://site/post#b
here. - How do fediverse replies, likes, and other interactions show up on my site?
-
To receive likes, reposts, replies, @-mentions, and follows from the fediverse, just make sure your site accepts webmentions! Bridgy Fed translates those interactions and sends them to your site as webmentions. The source URL will usually be a proxy page on
fed.brid.gy
. For best results, make sure your webmention handler detects and handlesu-url
links. - How do I read my fediverse timeline/feed?
-
Your user page has links to your fediverse timeline/feed, ie posts from people you follow, in HTML, Atom, and RSS formats. Add them to your feed reader or read them in your browser!
- How can people on the fediverse find and follow me?
-
They can search for your web site in any Mastodon instance! Often you can just enter your domain, eg
yourdomain.com
, in any Mastodon search box. If that doesn't work, try your full fediverse address, eg@yourdomain.com@yourdomain.com
. This can be finicky now and then, but it usually works.Your user page also has a "remote follow" form that lets people enter their fediverse address and follow you directly.
- I tried it, and it didn't work!
-
Check out your user page! It detects and describes common problems with your setup, and it shows your recent interactions and detailed logs.
- Who are you? Why did you make this?
-
I'm Ryan Barrett. I'm just a guy who likes the web and owning my data.
- How much does it cost?
-
Nothing! Bridgy Fed is small, and it doesn't cost much to run. We don't need donations, promise.
If you really want to contribute, file an issue or send a pull request, or donate to the IndieWeb!
- What do you do with my data?
-
Nothing! Bridgy Fed isn't a business, and never will be, so we don't have the same motivations to abuse your data that other services might. More concretely, Bridgy Fed won't ever send you email, it stores as little of your PII (personally identifiable information) as possible, and it never has access to any of your passwords.
- How long has this been around?
-
I started thinking about bridging federated social networks and peer to peer networks when I discovered them in the early 2000s. I started talking about bridging them to the IndieWeb in 2016, led a session on it at IndieWeb Summit in July 2017, wrote up concrete designs soon after, started working on Bridgy Fed in August 2017, and launched it on October 22, 2017.
- What are the terms of service?
-
Bridgy Fed's terms of service are very simple. You agree not to deliberately attack, breach, or otherwise harm the service. If you manage to access private keys or other private data, you agree to report the vulnerability and not use or disclose that data.
Otherwise, you may use the service for any purpose you see fit. However, we may terminate or block your access for any reason, or no reason at all. (We've never done this, and we expect we never will. Just playing it safe.)
Do you an administer an instance or other service that Bridgy Fed interacts with? If you have any concerns or questions, feel free to file an issue!
- I found a bug! I have a feature request!
-
Great! Please file it in GitHub. Thank you!
- I found a security vulnerability!
-
Oof. Thank you for reporting it! Please send details to security@brid.gy. We may provide monetary awards for reports of significant vulnerabilities, eg reading or modifying stored access tokens, if you follow these rules:
- Vulnerabilities must be in the application itself, not unrelated services like email (eg SPF/DKIM/DMARC).
- Out of scope: rate limiting, XSS/CSRF attacks (Bridgy Fed has no authenticated sessions or private data accessible to users),
/admin/*
pages. - Public user data is intentionally public. That's not a vulnerability.
- No automated fuzzing, DoSes, or other high volume traffic. We block this traffic, and it will disqualify you from any possible award.
Otherwise, the code is open source, feel free to try to break in, let us know if you succeed!