Add WebFinger to your site
WebFinger lets other services discover information about your site or identity across the internet. It’s a key component of federated networks like Mastodon and essential for cross-site interactions.
WebFinger is used to discover information about people or other entities on the Internet that are identified by a URI using standard Hypertext Transfer Protocol (HTTP) methods over a secure transport.
How discovery works
- Someone looks up
you@yourdomain.com
- Their client requests
https://yourdomain.com/.well-known/webfinger?resource=acct:you@yourdomain.com
- Your server responds with your WebFinger JSON
- The client uses the links to display your profile, avatar, or other resources
Common link types
profile-page
: Your main profile or about pageavatar
: Your profile picturealternate
: RSS feeds or other formatsself
: Your ActivityPub endpoint (for federation)
Implementation example
Let’s look at the davelage.com WebFinger on this site.
{
"subject": "acct:dave@davelage.com",
"links": [
{
"rel": "http://webfinger.net/rel/profile-page",
"type": "text/html",
"href": "https://davelage.com/about"
},
{
"rel": "http://webfinger.net/rel/avatar",
"type": "image/jpeg",
"href": "https://davelage.com/face-640.jpg"
},
{
"rel": "alternate",
"type": "application/rss+xml",
"href": "https://davelage.com/posts/index.xml"
}
]
}
The listed links are of relation profile-page
, avatar
and alternate
RSS
feed. See Link Relations for more info.
Conclusion
Adding WebFinger gives clients the ability to view info on you, showing your avatar and profile page. View your WebFinger on ActivityPub social networking sites like Mastadon to see how it’s working.
Find more information on the WebFinger spec.