Skip to content

Your site's name and logo

When someone uses your app, PrefsDB sometimes talks to them directly: the email that confirms their address, the page they see after clicking it, and the sign-in page for reviewing their data. Those always say which site the key is for, for example app.example.com, so your users know the message is about your app.

You can add your app's name and logo to them. You don't need a PrefsDB account for this.

Publish a small file on your site at this address:

https://<your site>/.well-known/prefsdb-site.json

For example https://app.example.com/.well-known/prefsdb-site.json, containing:

{
  "name": "Example Notes",
  "logo": "https://app.example.com/images/logo.png"
}

Both fields are optional. Use the same address your users open your app at: the file is read from the site their key was created on.

After that, your users see something like this:

Someone asked to create a PrefsDB key with this email address, from a page on Example Notes (app.example.com).

Your site's address always appears next to the name and logo, so people can tell which site they're dealing with.

Requirements

Your site Served over https.
The file At most 4 KB, served directly at that address (redirects aren't followed).
name Plain text. Up to 60 characters are shown.
logo An https link to a PNG or JPEG image, at most 100 KB and 1024 pixels wide or tall. A square image looks best; it's shown small. SVG isn't supported.

PrefsDB keeps its own copy of your logo and shows that, so your users' email doesn't load anything from your site.

When changes show up

PrefsDB reads your file at most once a day and remembers the result. A new or changed file shows up within a day. If the file was missing or had a problem, it's read again within about six hours.

If something is wrong with the file, nothing breaks: your users just see your site's address without the name or logo. If the name is fine but the logo isn't accepted, the name still shows.

If the file isn't found

Many hosts don't publish folders whose name starts with a dot, so check that the address opens in your browser:

  • GitHub Pages: add an empty file named .nojekyll to the root of the published branch or folder, or add include: [".well-known"] to your _config.yml.
  • Netlify, Cloudflare Pages, Vercel: put the .well-known folder in the folder your build publishes (for example public/), and make sure a catch-all rewrite (such as /* /index.html) doesn't take over /.well-known/.
  • Your own server: allow /.well-known/ if your configuration blocks paths that start with a dot.