Custom Domain: Where should the .well-known directory be?

I’m using dfx for a custom domain in a single project only (in Juno this particular question is certified and handled automatically) and I’ve got the following configuration.

  1. In my app’s static asset folder, there is a single .ic-assets.json file. You can find an example here: link. Note that for SvelteKit, the folder is named static while with the React starter kit, it might be called assets (e.g., ./src/frontend/assets/).

  2. The .well-known directory is a sub-directory of the static assets folder. You can find an example here: link. This setup works when the static folder is bundled to the root of the website. The ultimate goal is to serve the .well-known directory at the root of the website.

For example, if the website is https://helloworld.com, the ic-domains file should be served through https://helloworld.com/.well-known/ic-domains.

I hope this provides the information you were looking for. Let me know if you have any further questions.

2 Likes