Clear search
Close search
Google apps
Main menu

Enhance your organization's website even more with Google Site Search.

URL patterns

URL patterns are used to specify what pages you want included in your custom search engine. When you use the control panel or the Google Marker to add sites, you're generating URL patterns. Most URL patterns are very simple and simply specify a whole site. However, by using more advanced patterns, you can more precisely pick out portions of sites.

For example, the pattern '' will only match the single page ''. To cover all the pages where the URL starts with '', you must explicitly add a '*' at the end. In the form-based interfaces for adding sites, '' defaults to '**'. If this is not what you want, you can change it back in the control panel. No such defaulting occurs for patterns that you upload. Also note that URLs are case sensitive - if your site URLs include capital letters, you'll need to make sure your patterns do as well.

In addition, the use of wildcards in URL patterns allows you to include or exclude multiple pages or portions of a site all at once. The following patterns illustrate how you can use wildcards:

  • The wildcard pattern '*bar' specifies all the URLs that begin with '' and contain 'bar'.
  • The prefix pattern '*' specifies all the URLs that begin with '', i.e. all the URLs on the site.
  • The exact-match pattern '' specifies only the URLs '' and ''.

More detailed examples are included in this table:

Pattern Description Matches Does not match Matches a single page* Matches all URLs beginning with or*kites Matches all URLs that begin with or and contain the word "kites"*cat=Elec Matches all URLs that begin with and contain the term 'cat=Elec'*kites*fly Matches all URLs that begin with contain the words "kites" and "fly"
** Matches all sub-domains under

Adding "top-level domains" such as '*.com', '*.travel/*' is not permitted in Google site search. Adding "top-level domain" returns a "forbidden" error in Google site search - search results page.