Website Spec
← Well-Known URIs
Optional

/.well-known/webfinger

WebFinger (RFC 7033) resolves an account identifier such as acct:user@example.com to a set of links. The Fediverse uses it to discover ActivityPub actors.

What it is

WebFinger is a discovery protocol defined in RFC 7033. A client asks /.well-known/webfinger for information about a resource identifier — typically an account in the form acct:user@example.com — and the server returns a JSON Resource Descriptor (JRD) describing that resource and where to find more.

It is the protocol that lets you type @alice@mastodon.example into any Fediverse client and have it resolve to Alice's ActivityPub profile, regardless of which server she lives on.

Why it matters

If your site does not host accounts that need to federate, you do not need this URL.

How to implement

Accept GET requests with a resource query parameter. Return application/jrd+json.

GET /.well-known/webfinger?resource=acct:joost@example.com HTTP/1.1
Host: example.com
Accept: application/jrd+json

A typical response for a Fediverse account:

{
  "subject": "acct:joost@example.com",
  "aliases": [
    "https://example.com/@joost",
    "https://example.com/users/joost"
  ],
  "links": [
    {
      "rel": "http://webfinger.net/rel/profile-page",
      "type": "text/html",
      "href": "https://example.com/@joost"
    },
    {
      "rel": "self",
      "type": "application/activity+json",
      "href": "https://example.com/users/joost"
    }
  ]
}

Rules:

Common mistakes

Verification

curl -s "https://example.com/.well-known/webfinger?resource=acct:joost@example.com" | jq .

Then try to follow your account from a Mastodon server you do not control. If federation fails, WebFinger is almost always the first thing to check.

Sources