WebFinger

Descripció

WebFinger allows you to be discovered on the web using an identifier like you@yourdomain.com — similar to how email works, but for your online identity.

Why is this useful?

  • Fediverse & Mastodon: WebFinger is essential for federation. It allows Mastodon and other ActivityPub-powered platforms to find and follow your WordPress site.
  • Decentralized Identity: People can look you up using your WordPress domain, making your site the canonical source for your online identity.
  • Works with other plugins: This plugin provides the foundation that other plugins (like the ActivityPub plugin) build upon.

How it works:

When someone searches for @you@yourdomain.com on Mastodon or another federated service, their server asks your WordPress site: “Who is this person?” WebFinger answers that question by providing information about you and links to your profiles.

Technical details:

WebFinger is an open standard (RFC 7033) that enables discovery of information about people and resources on the internet. It works by responding to requests at /.well-known/webfinger on your domain.

Instal·lació

From WordPress.org (recommended)

  1. Go to Plugins Add New in your WordPress admin
  2. Search for “webfinger”
  3. Click Install Now, then Activate
  4. Make sure pretty permalinks are enabled (Settings Permalinks — select any option except “Plain”)
  5. Visit Tools Site Health to verify everything is working

Manual Installation

  1. Download the plugin from WordPress.org or GitHub
  2. Upload the webfinger folder to /wp-content/plugins/
  3. Activate the plugin in Plugins Installed Plugins
  4. Enable pretty permalinks if not already active
  5. Check Tools Site Health to confirm the setup

PMF

How do I customize my WebFinger identifier?

Go to Users Profile in your WordPress admin and scroll down to the “WebFinger” section. There you can set a custom identifier (the part before the @) and see all your WebFinger aliases.

How do I check if WebFinger is working?

Visit Tools Site Health in your WordPress admin. The plugin adds checks that verify your WebFinger endpoint is accessible and properly configured. If there are any issues, you’ll see guidance on how to fix them.

Does this work with Mastodon?

Yes! WebFinger is the standard that Mastodon and other Fediverse platforms use to discover users. When someone searches for @you@yourdomain.com, WebFinger tells them where to find your profile.

Do I need pretty permalinks?

Yes. WebFinger requires pretty permalinks to be enabled. Go to Settings Permalinks and select any option other than “Plain”.

For developers: How do I add custom data to the WebFinger response?

Use the webfinger_data filter to add your own links or properties:

add_filter( 'webfinger_data', function( $data ) {
  $data['links'][] = array(
    'rel'  => 'http://example.com/rel/profile',
    'href' => 'http://example.com/profile',
    'type' => 'text/html',
  );
  return $data;
} );

For developers: How do I add alternate output formats?

Use the webfinger_render action to output custom formats (like XRD):

add_action( 'webfinger_render', function( $webfinger ) {
  // Set custom headers and output your format
  // ...
  exit;
}, 5 );

See https://github.com/pfefferle/wordpress-webfinger-legacy for a complete example.

Where can I learn more about WebFinger?

Ressenyes

11 de novembre de 2023
I installed Webfinger and typed in the domain for my website into Mastodon instance photog.social. Mastodon immediately found ky ActivityPub endpoints.
20 de gener de 2023
Adding this plugin adds handling for the WebFinger protocol for your existing users. For example, when someone searches for you on Mastodon, your server will be queried for accounts using an endpoint that looks like this: GET ${MASTODON_DOMAIN}/.well-known/webfinger?resource=acct:${MASTODON_USER}@${MASTODON_DOMAIN} So, if you have a WordPress blog with the URL blog.domain and that blog has a user (you can see users in the Users admin panel) named user1, then the webfinger URL for that user would be: blog.domain/.well-known/webfinger?resource=acct:user1@blog.domain This plugin implements handling for such requests for any user on the WordPress site without any additional configuration.
15 de gener de 2023 1 resposta
There’s no admin panel and the documentation isn’t clear about how to configure the plugin.
Llegiu totes les 3 ressenyes

Col·laboradors i desenvolupadors

«WebFinger» és programari de codi obert. La següent gent ha col·laborat en aquesta extensió.

Col·laboradors

Registre de canvis

Project maintained on github at pfefferle/wordpress-webfinger.

4.0.1

  • Fixed: Handle WP_Error objects in filter_by_rel to prevent errors when WebFinger lookup fails

4.0.0

  • Added: Site Health integration to check your WebFinger setup status directly in WordPress
  • Added: User profile settings to customize your WebFinger identifier
  • Added: Verification links to easily test your WebFinger aliases
  • Improved: Security hardening for URI parsing and input validation
  • Improved: Modernized codebase for PHP 7.2+ with namespace support
  • Improved: Better organized code structure with separate classes
  • Updated: Development infrastructure with GitHub Actions for automated testing

3.2.7

  • Added: better output escaping
  • Fixed: stricter queries

3.2.6

  • remove E-Mail address

3.2.5

  • fix typo

3.2.4

  • update requirements

3.2.3

  • fixed acct scheme for discovery

3.2.2

  • fixed typo (thanks @ivucica)
  • use acct as default scheme

3.2.1

  • make acct protocol optional

3.2.0

  • global refactoring

3.1.6

  • added user_nicename as resource
  • fixed WordPress coding standard issues

3.1.5

  • fixed PHP warning

3.1.4

  • updated requirements

3.1.3

  • add support for the ‘aim’, ‘ymsgr’ and ‘acct’ protocol

3.1.2

  • fixed the legacy code
  • added feeds

3.1.1

  • fixed ‘get_user_by_various’ function

3.1.0

  • Added WebFinger legacy plugin, because the legacy version is still very popular and used by for example OStatus (Mastodon, Status.NET and GNU Social)
  • Added Webfinger for posts support

3.0.3

  • composer support
  • compatibility updates

3.0.2

  • get_avatar_url instead of custom code
  • some small code improvements
  • nicer PHP-docs

3.0.1

  • updated version informations
  • support the WordPress Coding Standard

3.0.0

  • added correct error-responses
  • remove legacy support for XRD and host-meta (props to Will Norris)

2.0.1

  • small bugfix

2.0.0

  • complete refactoring
  • removed simple-web-discovery
  • more filters and actions
  • works without /.well-known/ plugin

1.4.0

  • small fixes
  • added “webfinger” as well-known uri

1.3.1

  • added “rel”-filter (work in progress)
  • added more aliases

1.3

  • added host-meta resource feature (see latest spec)

1.2

  • added 404 http error if user doesn’t exist
  • added jrd discovery for host-meta

1.1

  • fixed an odd problem with lower WordPress versions
  • added support for the https://wordpress.org/extend/plugins/extended-profile/ (thanks to Singpolyma)

1.0.1

  • api improvements

1.0

  • basic simple-seb-discovery
  • json support
  • some small improvements

0.9.1

  • some changes to support http://unhosted.org

0.9

  • OStatus improvements
  • Better uri handling
  • Identifier overview (more to come)
  • Added filters
  • Added functions to get a users webfingers

0.7

  • Added do_action param (for future OStatus plugin)
  • Author-Url as Webfinger-Identifier

0.5

  • Initial release