Should asterisks be used as search wildcards in URLs?

ProcrustesPR

If the goal is to let general users search for pages through URLs, asterisks in the path should not be the first choice for expressing search criteria. The discussion highlights two main concerns: users may not understand what the asterisks mean, and encoding the URL may change the result. That does not mean a URL is unusable simply because it contains an asterisk. Asterisks in search engine queries are also distinct from a website’s custom URL syntax: working as a wildcard in a search query does not mean an asterisk will do the same in a URL.

ProcrustesPRProcrustesPRDoes my website need a speed score of 100?

An asterisk in a search term is not the same as a search command in a URL

A 2024 article on Neil Patel’s website uses “best * in NYC” to illustrate how an asterisk can stand in for words or phrases to find variations of a search query. This describes Google search usage at the time; it does not mean that all URLs interpret asterisks as wildcards, nor is it an official guarantee of current functionality.

In a separate discussion about URL design, a questioner proposed three forms of site search URL, each with a specific purpose:

  • “/some/folder/search-phrase*”: Find pages in the specified folder whose names begin with search-phrase.
  • “/some/**/*search-phrase*”: Find pages whose names contain search-phrase anywhere.
  • “/some/folder/*”: List all pages in the folder rather than display the default index page.

These were features the questioner wanted the website to implement, not established rules for URLs in general. One respondent also said they could not understand all the examples before reading the explanations.

Reserved characters and encoding also pose practical concerns

One participant opposed using asterisks because they are reserved characters. The specification they cited explains that characters may be reserved even when they do not act as delimiters in the generic syntax. However, “reserved” does not mean “always prohibited”; the discussion also included examples of websites using asterisks.

One respondent observed at the time that a Wayback URL used an asterisk to list archived versions from all dates, though they still considered the word all clearer. They also reported that archive.org returned a 404 after Stack Exchange encoded the asterisk in that link as %2a. This was the outcome for a particular link handled in a particular way at the time. It does not establish that all URLs containing asterisks will fail, nor does it describe either platform’s current behavior.

Make search criteria easy to understand before choosing a URL format

An alternative proposed in the original discussion was to put the criteria in a query string, such as “/some/folder/?find=search-phrase&where=start”, expressing the search text and match position separately. The website would still define these parameters, but they label the search criteria more clearly than the position of an asterisk alone. After considering concerns that users might not understand the design, the questioner also said they would most likely adopt this approach.

The takeaway from the discussion is to choose URL syntax carefully, not to rule out experimentation. The questioner believed in learning by doing, but also made clear that their version was still a pre-alpha, not live in production. “Technically usable” and “suitable for general users” remain two different things.

ProcrustesPRProcrustesPREight SEO essentials for beginners: Website speed

Asterisks as search wildcards in URLs: perspectives from across the web

Do asterisks in URLs make search criteria intuitive for users?

Not necessarily. One respondent said they could not understand all of the questioner’s asterisk examples before reading the explanations. Even if a design seems intuitive to its creator, users may not think to try it. If the search is intended for general users, consider how to express the search text and match position clearly rather than relying solely on the position of an asterisk to convey meaning.

If some websites use asterisks, does that mean URLs containing them can be shared without problems?

That conclusion does not follow. A participant observed that a Wayback URL used an asterisk to list archived versions from all dates, but also reported that archive.org returned a 404 after Stack Exchange encoded the link. This was only the outcome for a particular link and processing sequence at the time. A similar design would still require attention to how URLs are handled during different sharing and encoding steps.

Should asterisks be avoided entirely, even during experimentation?

No, but experimentation should be distinguished from production use. One participant argued that exploring approaches not yet fully understood can be a way to learn, but explicitly described their version as a pre-alpha that was not live in production. Another respondent cautioned that URL design is more complex than an ordinary learning exercise. Being able to try something experimentally does not establish that it is ready for production use.

ProcrustesPRWhat Ten Years of SEO Taught Me About Its Real Purpose

References

  1. Can I use asterisks in URLs?webmasters.stackexchange.com — Source used in the article above.
  2. Can I use asterisks in URLs?webmasters.stackexchange.com — Discusses: Do asterisks in URLs make search criteria intuitive for users?; If some websites use asterisks, does that mean URLs containing them can be shared without problems?
  3. Use These Google Search Operators to Improve Your SEOneilpatel.com · 2024-10-06T19:00:00+00:00 — Source used in the article above.
  4. Can I use asterisks in URLs?webmasters.stackexchange.com — Source used in the article above.
  5. Can I use asterisks in URLs?webmasters.stackexchange.com — Discusses: Should asterisks be avoided entirely, even during experimentation?
  6. Can I use asterisks in URLs?webmasters.stackexchange.com — Source used in the article above.
  7. Can I use asterisks in URLs?webmasters.stackexchange.com — Discusses: Should asterisks be avoided entirely, even during experimentation?
  8. Can I use asterisks in URLs?webmasters.stackexchange.com — Source used in the article above.

Related articles

Does my website need a speed score of 100?Eight SEO essentials for beginners: Website speedWhat Ten Years of SEO Taught Me About Its Real PurposeHow Do RWD and AWD Work, and Which Should You Choose for Your Website?What are the benefits and development challenges of SPAs?How do UTF-8 and Big5 differ in their effects on search rankings and user experience?What are single-page websites best suited for, and what are their pros and cons?Keep different topics on one site or split them up? Start with audience overlap and maintenance capacity
ProcrustesPR
ProcrustesPR