The /.well-known/ directory
I was checking my error log and noticed some requests the
"GET /.well-known/assetlinks.json HTTP/1.1" 404 "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" "GET /.well-known/apple-app-site-association HTTP/1.1" 404 "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
So I decided to see what they are.
What is the /.well-known/ directory?
/.well-known/ is defined in the RFC 5785. It’s essentially a directory for storing site-wide metadata files. In order to prevent naming conflicts the RFC specifies a register of well-known URI’s.
It also has the added bonus of not cluttering up the root directory with metadata files.
The /.well-known/assetlinks.json file
assetlinks.json file is part of the Digital Asset Links protocol which allows website owners to link URLs with native apps and share credentials with other websites:
The Digital Asset Links protocol and API enable an app or website to make public, verifiable statements about other apps or websites. For example, a website can declare that it is associated with a specific Android app, or it can declare that it wants to share user credentials with another website.
— Google Digital Asset Links
Unless you have an app that you want to link with your website, you probably don’t need this.
The /.well-known/apple-app-site-association file
apple-app-site-association file is used for Apple’s Universal Links to link URLs with native iOS apps. When a user clicks on a linked URL, it will open the linked native app if installed. If the app isn’t installed the URL will open as normal in Safari.
Like the Digital Asset Links protocol, unless you have a native app you probably don’t need this either.