Anyone ever needed to create a .well-known directory and got it working?

We need to create a .well-known directory in the root of the application on the server (IIS). We need to put a file in there so that a third party can verify out domain. For testing we’ve placed a simple test.html file in there but we’re getting redirected to /litium when we try to access it from a browser. Removing the leading . makes it work but since the third party will check the url with the . for the file that doesn’t help.
I’ve tried all sorts of suggestions I’ve found googling for the problem but none of them seem to work.

Anyone who has done this and made it work?

Litium version: 7

I have only used the .well-known directory together with Letsencrypt to validate that I have own the domain that is pointed to the server. They have automated tools that will create this directory and add the corresponding file in that folder, the problem is that when this is created the site recycled and some installations takes more time then the timeout for file-verification accept and then the verification is failing.

Easiest to get around this is to switch to domain validated domains instead with acme-dns for easy help to update the domain entry that need to exists for the installation.

More advanced can be to create a application directory that is outside the wwwroot folder and in the web.config remove not needed handlers and modules so IIS not trying to load Litium inside this folder. Maybe if we set “No managed code” on the application pool you can get around to add removal of handlers and modules, but have not tried that.

If running this together with Litium, remember to set the disallowed path to include the directory name, see Basic settings in web.config (litium.com), this prevent Litium to do page lookups for the accessed url.

Thanks Patric! The last thing, disallowing the path .well-known, seems to do the trick.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.