Here’s a minimal OpenSearch description you can use as opensearch.xml. Replace the placeholders with your site’s details. Save it at your site root (e.g., https://example.com/opensearch.xml) and you can advertise it with a tag on your pages.
Minimal example (search only)
YourSiteSearch YourSiteUTF-8https://www.yoursite.com/favicon.ico
Optional: adding a suggestions URL (for autocomplete)
YourSiteSearch YourSiteUTF-8https://www.yoursite.com/favicon.ico
How browsers discover it
- Host a file at your root: https://yourdomain.com/opensearch.xml
- Optional HTML link tag in your pages:
Notes
- Template placeholders use {searchTerms} for what the user types.
- The Url element with type="text/html" defines the actual search results page.
- If you add a suggestions URL (application/x-suggestions+json), browse/autocomplete can fetch suggestions as the user types.
- Content-type for the file can be application/opensearchdescription+xml or application/xml in practice; many browsers accept either.
If you want, tell me your site name, search URL pattern (for example, https://example.com/search?q={searchTerms}), and your favicon URL, and I’ll tailor a ready-to-use opensearch.xml for you.