If you run a normal website and also an onion service with the same content, Onion-Location is how you let Tor users know. Add a header to your HTTPS responses:

Onion-Location: http://youronionaddress.onion/path

or the equivalent <meta http-equiv="onion-location" content="..."> tag in your HTML. When Tor Browser sees it on an HTTPS page, a purple ".onion available" pill appears in the address bar. Users can click it, or set Tor Browser to always prefer onions automatically.

It arrived in Tor Browser 9.5 in 2020. Two details trip people up. The header is ignored on plain HTTP pages, so a downgrade attacker can't inject a fake one. And the onion URL should mirror the path, so you land on the same article, not the homepage. In nginx that usually means appending $request_uri to the address.

It's a nice touch for news sites and projects with privacy-minded readers. It also gives visitors a way to find your real onion address without trusting a third-party directory.