How to Check Whether a WebFinger Lookup Points to the Profile You Intended

Learn how to check a WebFinger profile lookup, inspect its resource and returned links, and investigate redirects before adding an account to a directory.

Published
Reading time
6 min read
How to Check Whether a WebFinger Lookup Points to the Profile You Intended
On this page

A WebFinger lookup can help you find links associated with a federated account, but the lookup URL itself is not necessarily the profile URL. To check a WebFinger profile lookup, inspect what account was requested, examine the links returned, and compare the destination with the public account you meant to list.

This guide uses a fictional account. RFC 7033 and current platform documentation were not available to consult for this article, so check the documentation for the platform you are cataloging before relying on platform-specific link types or redirect behavior.

Key Takeaways

  • The request host is the server receiving the lookup; the resource parameter identifies the account being requested.
  • A response can contain several links. An API or actor link is not necessarily the human-readable profile page you want in a directory.
  • Compare the destination and any redirects with the intended public account, using an independent trusted source when possible.
  • A parsed URL or a successful lookup does not independently prove a person's identity or endorsement.

Read the lookup request

Consider this fictional URL:

https://social.example/.well-known/webfinger?resource=acct%3Aeditor%40social.example

Its components have different roles:

  • social.example is the host receiving the request.
  • /.well-known/webfinger is the WebFinger endpoint path.
  • The query parameter resource decodes to acct:editor@social.example, the account identifier being looked up. The acct: identifier is not itself a profile page URL.

The request host and the account domain happen to match in this example. Do not assume they must always match in every deployment: delegation and platform configuration can affect where a lookup is served. A response may point to a profile on another host, which warrants investigation rather than an automatic conclusion that it is wrong.

Advertisement

Parse the request URL safely

For an existing request URL, a browser's developer console can separate its components without sending a network request. This example uses only the fictional URL above:

const requestUrl = 'https://social.example/.well-known/webfinger?resource=acct%3Aeditor%40social.example';

try {
  const url = new URL(requestUrl);
  console.log({
    host: url.host,
    path: url.pathname,
    resource: url.searchParams.get('resource')
  });
} catch (error) {
  console.error('Invalid URL:', error.message);
}

The expected behavior is to show the host, endpoint path, and decoded resource value. This example was not executed for the article. host includes a port if one is present; use hostname if you need the hostname without the port.

Parsing tells you what the URL says, not whether the server is trustworthy or whether the account belongs to the intended person. Avoid pasting private account details, tokens, or sensitive query strings into a third-party tool.

Compare the response with the intended account

Obtain the lookup response through a method appropriate to the platform, such as inspecting a request made by an existing client in browser developer tools. Use a public account for which you have a reason to perform the lookup, and avoid exposing credentials or private data when sharing diagnostic details.

Then work through the response:

  1. Check the requested resource. Confirm that the decoded resource is the account identifier you meant to look up. A typo, an old domain, or an identifier for a similarly named account can lead you elsewhere.
  2. Inspect the response subject and links. If the response supplies a subject, compare it with the requested identifier. Look at each link's relationship, destination (href), and content type where supplied. A response may include links for different purposes; do not assume the first link is the public profile. A machine-readable actor or API link may not be suitable as a directory link.
  3. Compare the candidate destination. Examine its scheme, hostname, port, and path against the intended public profile. Look carefully for spelling differences, unexpected hosts, and changed account paths. URL paths can be case-sensitive, so do not lowercase them to force a match. Compare meaningful query parameters too, if the platform uses them.
  4. Check independently. Compare the destination with a profile link published by the account holder on another trusted public channel, or use a confirmation process established by your directory. A matching display name or avatar alone is weak evidence.

A different destination is not necessarily an error: a service might use a separate profile domain or an account may have moved. Equally, a plausible-looking destination is not proof that it is the right one. Consult the platform's current documentation and seek independent confirmation when the relationship is unclear.

Investigate redirects and missing results

If a candidate profile URL redirects, inspect the redirect chain and final destination before adding it. Browser developer tools can show the requests and status codes. Check every host transition, not just the final page. A redirect can reflect a normal migration or canonical URL, but it can also lead to an unrelated destination. Avoid entering credentials into an unexpected site.

A missing result, an error response, or a response without a usable profile link does not by itself prove an account is fake or absent. Possible explanations include a typo, a renamed or removed account, a temporary service problem, or a platform that exposes a different link than the one you expected. Record what you observed and check again or consult the platform's documentation before drawing a conclusion.

Advertisement

Common Mistakes

  • Listing the WebFinger endpoint as the profile. It is a lookup endpoint; select the appropriate profile destination from the response instead.
  • Confusing the endpoint host with the account domain. Inspect the resource and the returned links separately.
  • Treating any returned link as a profile page. Check its relationship and purpose rather than relying on its position in the response.
  • Ignoring redirects or unexpected host changes. Verify the final destination and investigate discrepancies.
  • Treating a response as identity verification. The lookup reports information from a service; it does not independently establish who controls an account or whether that person endorses your listing.

Best Practices

For each directory entry, keep a record of the account identifier you checked, the profile URL you selected, and any unresolved discrepancy. Use an independent confirmation route for entries where attribution matters. Recheck links periodically, especially after a domain or account migration.

If you build an automated checker, treat response links and redirects as untrusted input. Parsing a URL or checking its hostname alone is not sufficient protection for a server that fetches URLs: restrict schemes and destinations, account for DNS resolution and rebinding, revalidate redirects, and enforce network egress controls, timeouts, and response-size limits.

Conclusion

Check the requested account, the returned link's purpose, and the final profile destination as separate pieces of evidence. When they do not clearly match the intended public account, investigate before listing it; when identity or endorsement matters, obtain independent confirmation.

What would your domain sell for?

A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.