Bridgy Fed turns your web site into its own <ahref="https://en.wikipedia.org/wiki/Fediverse">fediverse</a> account, visible in <ahref="https://joinmastodon.org/">Mastodon</a> and beyond. You can post, reply, like, repost, and follow fediverse accounts by posting on your site with <ahref="https://microformats.org/wiki/microformats2">microformats2</a> and sending <ahref="https://webmention.net/">webmentions</a>. Bridgy Fed translates those posts into <ahref="https://activitypub.rocks/">ActivityPub</a>, and when people inside the fediverse respond, it sends those responses back to your site as webmentions.
This isn't <ahref="https://indieweb.org/syndication">syndication</a> or <ahref="https://indieweb.org/POSSE">POSSE</a>! 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, <ahref="https://www.google.com/search?q=rss+atom+mastodon+bot">consider an RSS or Atom feed bot instead</a>. Or, if you want to cross-post to an existing Mastodon account, <ahref="https://brid.gy/">try Bridgy</a>.
<p>Here are instructions for a few common web servers:</p>
<ul>
<li>
<p><em><ahref="http://wordpress.org/">WordPress</a> (self-hosted)</em>: install the <ahref="https://wordpress.org/plugins/safe-redirect-manager/">Safe Redirect Manager</a> plugin, then add these entries:</p>
<li><em><ahref="http://withknown.com/">Known</a></em> or <em><ahref="https://drupal.org/project/indieweb">Drupal</a></em>: follow the <ahref="#apache">Apache</a> or <ahref="#nginx">nginx</a> instructions below.
</li>
<liid="apache"><em><ahref="http://httpd.apache.org/">Apache</a></em>: add this to your <code>.htaccess</code> file:<br/>
(<code>RewriteEngine on</code> is optional if you already have it earlier in your <code>.htaccess</code>. <code>RewriteBase /</code> is optional if you don't have any other <code>RewriteBase</code> directives, or if you put this <code>RewriteRule</code> inside an existing <code>RewriteBase /</code> section.)
</li>
<liid="nginx"><em><ahref="https://nginx.org/">nginx</a></em>: add this to your <code>nginx.conf</code> file, in the <code>server</code> section:<br/>
<li>Add <ahref="https://webmention.net/">webmention</a> 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. <ahref="https://indieweb.org/webmention#Publishing_Software">Check out the IndieWeb wiki</a> for instructions for your web server.</li>
<liid="profile"class="question">How do I set up my profile?</li>
<liclass="answer">
<p>
Your site's fediverse profile comes from the <ahref="https://microformats.org/wiki/microformats2">microformats2</a><ahref="https://indieweb.org/representative_h-card">representative h-card</a> on your site's home page. Here's a minimal example to set your name and a profile picture:
<p>If you want to set a <ahref="https://docs.joinmastodon.org/user/profile/#header">header image</a>, add a <code><ahref="https://indieweb.org/featured">u-featured</a></code> image to your h-card, eg:
<p>By default, your fediverse address will be <code>@yourdomain.com@yourdomain.com</code>. Many services (eg Mastodon) default to only showing the username, so this generally shows up as just <code>@yourdomain.com</code> in posts, and the full address appears on hover.</p>
<p>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 <code>acct:</code><ahref="https://microformats.org/wiki/rel-me">u-url</a> link inside your h-card with <code>username@yourdomain.com</code>, eg:
<liid="update-profile"class="question">How do I update my profile?</li>
<liclass="answer">
<p> If you've changed the <ahref="https://indieweb.org/representative_h-card">representative h-card</a> on your site's home page, and you want to update your profile in Mastodon to match, click the <buttonclass="btn btn-default glyphicon glyphicon-refresh"></button> button next to your domain <ahref="/web-site">on your user page</a>. Alternatively, you can send a webmention from your home page to <code>https://fed.brid.gy/</code>.
<liid="user-page"class="question">Where's my user page and dashboard?</li>
<liclass="answer">
<p>
<ahref="/web-site">Enter your domain here</a> 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.
Create a <ahref="https://indieweb.org/post">post</a> with the <ahref="https://microformats.org/wiki/h-entry"><code>h-entry</code> microformat</a> on your web site. Many web servers include this or compatible microformats automatically. The post can be a <ahref="https://indieweb.org/note#How_to">note</a>, <ahref="https://indieweb.org/article">article</a>, <ahref="https://indieweb.org/like">like</a>, <ahref="https://indieweb.org/repost">repost</a>, <ahref="https://indieweb.org/reply">reply</a>, or <ahref="https://indieweb.org/follow">follow</a>. For example:
<p class="<spanclass='keyword'>e-content</span>"><spanclass='value'>Two naked tags walk into a bar. The bartender exclaims, "Hey, you can't come in here without microformats, this is a classy joint!"</span></p>
<p><ahref="https://docs.joinmastodon.org/spec/activitypub/#sanitization">Mastodon preserves HTML links and line breaks, but removes all other formatting and tags.</a> Other fediverse sites vary in their HTML handling.
<p>Then, include a link (optionally blank) to <code><ahref="https://fed.brid.gy/">https://fed.brid.gy/</a></code> in that post and <ahref="#setup">send Bridgy Fed a webmention</a>. 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 <ahref="https://indieweb.org/Webmention#Manual_Webmentions">you can send it manually.</a>
<p>(The <code>u-bridgy-fed</code> class isn't strictly necessary, but it's useful in some cases to prevent microformats2 parsers from <ahref="https://microformats.org/wiki/microformats2-implied-properties#hyperlink_and_url_property">interpreting the link as an implied <code>u-url</code></a>.)
<liid="which-posts"class="question">Which of my posts will show up in the fediverse?</li>
<liclass="answer">
<p>Only the ones you <ahref="#send+Bridgy+Fed+a+webmention">explicitly trigger with a webmention</a>. 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.
<p><ahref="https://diasporafoundation.org/">diaspora*</a> is unlikely because they use <ahref="https://diaspora.github.io/diaspora_federation/">their own federation protocol</a>, <ahref="https://discourse.diasporafoundation.org/t/lets-talk-about-activitypub/741/1">not ActivityPub</a>. <ahref="https://github.com/snarfed/bridgy-fed/issues/7">Details.</a></p>
<p>Magic! Most major blog engines and CMSes are supported out of the box, no setup necessary. Bridgy Fed looks for <ahref="http://microformats.org/">microformats</a> in your HTML, first the <ahref="http://microformats.org/wiki/microformats2">microformats2</a><code><ahref="https://microformats.org/wiki/h-entry#Core_Properties">e-content</a></code> class and then the legacy <code><ahref="https://microformats.org/wiki/hatom#Entry_Content">entry-content</a></code> class. It also understands more advanced microformats2 classes like <code><ahref="#reply">in-reply-to</a></code>, <code><ahref="#like">u-like-of</a></code>, <code><ahref="#like">u-repost-of</a></code>, and <code><ahref="#image">u-photo</a></code>.
<p>Bridgy Fed sends the full contents of all posts, specifically everything inside <code><ahref="https://microformats.org/wiki/h-entry#Core_Properties">e-content</a></code>, to the fediverse. However, not all fediverse apps currently <em>show</em> the full contents of all posts.
<p>For example, text-based posts fall into two broad buckets: short <ahref="https://indieweb.org/note">notes</a>, eg tweets and toots, and longer <ahref="https://indieweb.org/article">articles</a>, eg blog posts. In the IndieWeb, <ahref="https://indieweb.org/post-type-discovery#Algorithm">we differentiate based on whether the post has a title</a>: articles generally have titles, notes don't.
<p>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.
</li>
<liid="visible-links"class="question">What's up with the visible fed.brid.gy links in my fediverse posts?</li>
<liclass="answer">
<p>These can happen for a couple reasons. For articles, this is expected behavior, <ahref="#which-parts">as described above</a>. The link is a Bridgy Fed URL that redirects to the original post on your web site. This is <ahref="https://github.com/mastodon/mastodon/pull/6219#issuecomment-429142747">because</a> Mastodon <ahref="https://github.com/snarfed/bridgy-fed/issues/16#issuecomment-424799599">requires</a> 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!
<p>Otherwise, this may be the <ahref="#how-post">invisible fed.brid.gy link that's required to trigger Bridgy Fed</a>. Mastodon will show a preview of links even if their text is blank, so if your link is inside your <code><ahref="https://microformats.org/wiki/h-entry#Core_Properties">e-content</a></code> microformats2 element, that's probably what's happening. You can prevent that by moving it outside of <code>e-content</code>. It can go anywhere in your HTML!
<liid="reply"class="question">How do I reply to a fediverse post?</li>
<liclass="answer">
<p>
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 <code><ahref="http://microformats.org/wiki/rel-in-reply-to">u-in-reply-to</a></code>, as if you were publishing a normal <ahref="https://indieweb.org/comment">IndieWeb reply</a>. For example:
<p class="<spanclass='keyword'>e-content</span>"><spanclass='value'>Highly entertaining. Please subscribe me to your newsletter.</span></p>
<liid="like"class="question">How do I favorite (aka like) or boost (aka repost) a fediverse post?</li>
<liclass="answer">
<p>Favoriting and boosting are almost exactly the <ahref="#reply">same as replying</a>. The only difference is that you use <code><ahref="https://indieweb.org/like">u-like-of</a></code> for a favorite/like or <code><ahref="https://indieweb.org/repost">u-repost-of</a></code> for a boost/repost.
<p>If your web site supports <ahref="https://indieauth.net/"style="white-space: nowrap"><imgsrc="/oauth_dropins_static/indieauth_logo.png"style="height: 1em; margin-top: -.2em; white-space: nowrap"/> IndieAuth</a>, <ahref="/web-site">go to your user page</a>, click the <em>Following</em> link, then enter the address of the account you want to follow.
<p>You can also follow someone by posting an <ahref="https://indieweb.org/follow#How_to_markup">IndieWeb follow</a> on your site, including the <code>u-follow-of</code> microformats2 class, and sending a webmention to Bridgy Fed. Your site may do that automatically if it supports webmentions. For example:
I'm now following <a class="<spanclass='keyword'>u-follow-of</span>" href="<ahref='https://octodon.social/@cwebber'>https://octodon.social/@cwebber</a>">@cwebber@octodon.social</a>!
This method doesn't require IndieAuth, and it can be automated.</p>
</li>
<liid="unfollow"class="question">How do I unfollow someone?</li>
<liclass="answer">
<p><ahref="/web-site">Go to your user page</a>, click the <em>Following</em> link, find the account you want to unfollow, and click the X next to their address. Like <ahref="#follow">following</a>, this requires your web site to support <ahref="https://indieauth.net/"style="white-space: nowrap"><imgsrc="/oauth_dropins_static/indieauth_logo.png"style="height: 1em; margin-top: -.2em; white-space: nowrap"/> IndieAuth</a>.
<liid="update"class="question">How do I edit an existing post?</li>
<liclass="answer">
<p>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 <ahref="https://www.w3.org/TR/activitypub/#update-activity-outbox"><code>Update</code> activity</a> for it to the fediverse.
<liid="fragment"class="question">Can I publish just one part of a page?</li>
<liclass="answer">
<p>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 <code>bar</code> post here:</p>
<liid="backfeed"class="question">How do fediverse replies, likes, and other interactions show up on my site?</li>
<liclass="answer">
<p>
To receive likes, reposts, replies, @-mentions, and follows from the fediverse, just make sure your site accepts <ahref="https://webmention.net/">webmentions</a>! Bridgy Fed translates those interactions and sends them to your site as webmentions. The source URL will usually be a proxy page on <code>fed.brid.gy</code>. For best results, <ahref="https://brid.gy/about#appspot">make sure your webmention handler detects and handles <code>u-url</code> links</a>.
<p><ahref="#user-page">Your user page</a> 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!
<liid="notifications"class="question">Are there notifications?</li>
<liclass="answer">
<p>Yes! <ahref="#user-page">Your user page</a> shows a feed of your notifications - mentions, replies, likes, reposts, follows, etc - in <ahref="https://microformats.org/wiki/h-feed">h-feed format</a>, which you can subscribe to in any <ahref="https://indieweb.org/social_reader">social reader</a>. <ahref="">Let us know if you want other formats!</a>
<p>They can search for your web site in any Mastodon instance! Often you can just enter your domain, eg <code>yourdomain.com</code>, in any Mastodon search box. If that doesn't work, try your full fediverse address, eg <code>@yourdomain.com@yourdomain.com</code>. This can be finicky now and then, but it usually works.
<p><ahref="#user-page">Your user page</a> has a "Following" link that shows you everyone on the fediverse who's currently following you. It also has a "remote follow" form that lets people enter their fediverse address and follow you directly.
</p>
</li>
<liid="see-posts"class="question">How can I see what my posts look like inside the fediverse?</li>
<p>This <ahref="apps">varies by fediverse app</a>. For Mastodon, <ahref="#currently+following_you">open your list of followers in Bridgy Fed</a> and click on one to open their profile. Then, inside that Mastodon instance, <ahref="discovery">search for your site's address</a>, click on it in the search results, and you'll see your fediverse profile and all of your posts that were delivered to that instance. This may not be all of them, depending on how long and when people on that instance have been following you.</p>
<p>Note: in Mastodon, each of your posts on a given instance will have a permalink inside that instance, eg <ahref="https://mastodon.social/@snarfed.org@snarfed.org/109729052169033033">mastodon.social/@snarfed.org@snarfed.org/109729052169033033</a>, but those permalinks <em>only go to Mastodon if you're logged into that instance.</em> If you're not, they redirect to the original post on your site.
<p><ahref="#user-page">Check out your user page!</a> It detects and describes common problems with <ahref="#setup">your setup</a>, and it shows your recent interactions and detailed logs.
<liid="who"class="question">Who are you? Why did you make this?</li>
<liclass="answer">
<p>
I'm <ahref="https://snarfed.org/">Ryan Barrett</a>. I'm just a guy who likes <ahref="https://snarfed.org/2012-07-25_why_i_have_my_own_web_site">the web</a> and <ahref="https://indieweb.org/why">owning my data</a>.
<liid="cost"class="question">How much does it cost?</li>
<liclass="answer">
<p>Nothing! Bridgy Fed is small, and it doesn't cost much to run. We don't need donations, promise.
</p>
<p>If you <em>really</em> want to contribute, <ahref="https://github.com/snarfed/bridgy-fed/issues">file an issue</a> or <ahref="https://github.com/snarfed/bridgy-fed">send a pull request</a>, or <ahref="https://opencollective.com/indieweb">donate to the IndieWeb</a>!
</p></li>
<liid="privacy"class="question">What do you do with my data?</li>
<liclass="answer">
<p>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 <ahref="http://en.wikipedia.org/wiki/Personally_identifiable_information">PII</a> (personally identifiable information) as possible, and it <em>never</em> has access to any of your passwords.
</p>
</li>
<liid="history"class="question">How long has this been around?</li>
<p>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, <ahref="http://indieweb.org/2017/ostatusbridge">led a session on it at IndieWeb Summit</a> in July 2017, wrote up <ahref="https://snarfed.org/indieweb-activitypub-bridge">concrete</a><ahref="https://snarfed.org/indieweb-ostatus-bridge"> designs</a> soon after, started working on Bridgy Fed in August 2017, and <ahref="https://snarfed.org/2017-10-22_bridgy-fed">launched it on October 22, 2017</a>.
<p>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 <ahref="#vulnerability">report the vulnerability</a> and not use or disclose that data.
<p>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.)
</p>
<p>Do you an administer an instance or other service that Bridgy Fed interacts with? If you have any concerns or questions, feel free to <ahref="https://github.com/snarfed/bridgy-fed/issues">file an issue</a>!
<liid="vulnerability"class="question">I found a security vulnerability!</li>
<liclass="answer">
<p>Oof. Thank you for reporting it! Please send details to <ahref="mailto:security@brid.gy">security@brid.gy</a>. We may provide monetary awards for reports of significant vulnerabilities, eg reading or modifying stored access tokens, <em>if</em> you follow these rules:</p>
<ul>
<li>Vulnerabilities must be in the application itself, not unrelated services like email (eg SPF/DKIM/DMARC).</li>
<li>Out of scope: rate limiting, XSS/CSRF attacks (Bridgy Fed has no authenticated sessions or private data accessible to users), <code>/admin/*</code> pages.
<li>No automated fuzzing, DoSes, or other high volume traffic. We block this traffic, and it will disqualify you from any possible award.</li>
</ul>
<p>Otherwise, <ahref="https://github.com/snarfed/bridgy-fed/">the code is open source</a>, feel free to try to break in, let us know if you succeed!</p>