What Is the .well-known Directory Used For?

Overview

The .well-known directory is a directory inside your ~/public directory that plays a crucial role in web-based protocols. It fetches “site-wide metadata” about a host before making a request. If you can’t see the .well-known directory, don’t worry; it just means you haven’t used or created it yet. Our automated procedures that rely on the .well-known directory will create it automatically if it’s not there.

Importance of the .well-known Directory

The .well-known directory is crucial to various web services and security protocols. For instance, HTTPS certificate verification processes use it.

How to Create the .well-known Directory

Using SSH

With SSH, you can simply run the following command after connecting to your environment:

mkdir ~/public/.well-known

Using SFTP

With SFTP, you can usually right-click within your SFTP application on the parent directory, This is the ~/public directory in this case. Choose “Create directory” and name the new directory .well-known.