OpenSearch Generator
Generate a complete OpenSearch XML description document so browsers can add your site's search as a custom search engine.
Must contain the literal placeholder {searchTerms}
opensearch.xml:
How to Use the OpenSearch Generator
OpenSearch is a standard XML format that lets browsers offer your site's search as a custom search engine a visitor can add to their browser. Fill in a short name, description, the search URL your site uses (with {searchTerms} marking where the query text goes), and a favicon URL, then copy the generated opensearch.xml file. Host it on your site and reference it from your HTML <head> with <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Your Site">.
Example
A search URL template of https://example.com/search?q={searchTerms} tells the browser to replace {searchTerms} with the user's typed query and send them straight to your search results page.
Common Use Cases
- Letting visitors add your site's internal search as a custom search engine in their browser.
- Meeting a checklist item for browser-integration or site-discoverability audits.
- Providing autodiscovery so browser address bars can suggest your site as a search shortcut.
FAQs
- What happens if my search URL doesn't contain {searchTerms}? The generator blocks output and shows an error, since a template without that placeholder gives the browser nowhere to insert the user's search query, making the description document useless.
- Where do I host the generated file? Anywhere on your domain — commonly at the root, e.g.
/opensearch.xml— then link to it from your page's<head>so browsers can discover it automatically. - Do all browsers support OpenSearch autodiscovery? Support varies by browser and has changed over time, so treat it as a nice-to-have enhancement for browsers that support it rather than a feature every visitor will see.
