Some background reading on WebFinger starting at and then moving on to a few references such as and I decided to knock up a quick and dirty static version.

An apache redirect

RewriteRule ^.well-known/host-meta lib/host-meta.xml

so that the “well known” location points to a file in here

<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns=''
  <!-- Resource-specific Information -->

  <Link rel='lrdd'
        template='{uri}' />

Then a second rewrite rule and a MIME type declaration:

AddType application/xrd+xml .xrd
RewriteRule ^webfinger/$ lib/webfinger-ajft.xrd

so that the one and only WebFinger end point also points to a static file:

<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns=''>

That should be all we need to create a bare bones implementation of WebFinger. The well-known should return the template document, which then tells people to try, or any other account, but only that one will return valid information.