Template:Google custom
Usage
Creates a Google custom-search link, which searches one site (and, optionally, pages with URLs containing one directory path in the site). (If you want to search on the entire Web, use {{Google}} instead.) This template takes three unnamed input parameters; the first is required and the other two optional:
- A domain name, and optionally the first part of directory path (to specify one part of the site to search). (Required.) This parameter becomes the values of the
sitesearch=
anddomains=
parameters in the resulting search URL. If the value ends in a directory path component, it evidently must end with a complete path component. For Wikipedia URLs, this would be everything up to a slash, a colon (including or not including the slash or colon has no effect on the resulting search). Delimiting a search with other punctuation characters can sometimes work, such as a trailing opening parenthesis character. Examples:en.wikipedia.org
— (search all of the English Wikipedia)en.wikipedia.org/wiki/Wikipedia:Help_desk
— (search the English Wikipedia Help desk)en.wikipedia.org/wiki/Help:
— (search the English Wikipedia's Help:namespace)en.wikipedia.org/wiki/Help_
— (generates a search link that does not work: try it, evidently because no Wikipedia page URLs contain the string with a colon or a slash immediately after it)en.wikipedia.org/wiki/Wikipedia:Village_pump_(
— (search the English Wikipedia's Village pump section-specific pages and their archive pages; evidently the trailing open parenthesis character is necessary to make this work)
- (optional) The search term or terms. If this parameter is empty, clicking on the resulting link generates a Google search form with an initially blank input field, ready to search on the site the first parameter specifies.
- (optional) Link text displayed on the page.
The template can also take any of three optional named parameters:
- (optional)
|noicon=
Set (to anything, e.g.|noicon=on
) to suppress the appearance of the external-link icon "" (File:Icon External Link.svg) after the link. - (optional)
|color=
or|colour=
Use to set the colo/ur of the link (e.g.|color=blue
). - (optional)
|style=
Use to setCSS stylingfor the link.
Do not use in articles
Do not use this template in user pages , etc.). The template will produce an ugly messagebox warning if you attempt to use it in an article. |
Examples
The template allows for some very flexible searching on entire
How to search entire sites
Type this | To get this | What it produces, or searches for |
---|---|---|
{{google custom|en.wikipedia.org||Search Wikipedia}} |
Search Wikipedia | Blank form to search Wikipedia (also see: {{Google Wikipedia}}) |
{{google custom|en.wikipedia.org|google|Search Wikipedia for "google"}} |
Search Wikipedia for "google" | Search Wikipedia for "google" |
{{google custom|meta.wikimedia.org||Search Meta-Wiki with Google}} |
Search Meta-Wiki with Google | Blank form to search Meta-Wiki |
{{google custom|www.mediawiki.org||Search MediaWiki.org with Google}} |
Search MediaWiki.org with Google | Blank form to search MediaWiki.org |
{{google custom|deletionpedia.dbatley.com||Search Deletionpedia with Google}} |
Search Deletionpedia with Google | Blank form to search Deletionpedia (articles deleted from Wikipedia)
|
How to search Wikipedia namespaces
Type this | To get this | What it produces, or searches for |
---|---|---|
{{google custom|en.wikipedia.org/wiki/Wikipedia:||Search Wikipedia's Wikipedia: namespace}} |
Search Wikipedia's Wikipedia: namespace | Blank form to search the Wikipedia: namespace |
{{google custom|en.wikipedia.org/wiki/MediaWiki:||Search Wikipedia's MediaWiki: namespace}} |
Search Wikipedia's MediaWiki: namespace | Blank form to search the MediaWiki: namespace |
{{google custom|en.wikipedia.org/wiki/Category:||Search Wikipedia's Category namespace}} |
Search Wikipedia's Category namespace | Blank form to search Wikipedia's Category: namespace |
{{google custom|en.wikipedia.org/wiki/Help:||Search Wikipedia's Help: namespace}} |
Search Wikipedia's Help namespace | Blank form to search Wikipedia's Help: namespace |
{{google custom|en.wikipedia.org/wiki/File:||Search Wikipedia's File: namespace}} |
Search Wikipedia's File namespace | Blank form to search Wikipedia's File: namespace |
{{google custom|en.wikipedia.org/wiki/User:||Search Wikipedia's User: namespace}} |
Search Wikipedia's User namespace | Blank form to search Wikipedia's User: namespace |
{{google custom|en.wikipedia.org/wiki/Template:|google|Search Wikipedia's Template: namespace for "google"}} |
Search Wikipedia's Template: namespace for "google" | Search Wikipedia's Template: namespace for "google" |
How to search subpage trees within Wikipedia
Wikipedia has many
Type this | To get this | What it produces, or searches for |
---|---|---|
{{google custom|en.wikipedia.org/wiki/Wikipedia:Help_desk||Search Wikipedia Help desk}} |
Search Wikipedia Help desk | Blank form to search the Wikipedia Help desk (also see: {{Google help desk}}) |
{{google custom|en.wikipedia.org/wiki/Wikipedia:New_contributors%27_help_page/Archive||Search Wikipedia New Contributors' help page archive}} |
Search Wikipedia New Contributors' help page archive | Blank form to search the Wikipedia New Contributors' help page archive |
{{google custom|en.wikipedia.org/wiki/Wikipedia:Clueless_newbies||Search Wikipedia Clueless newbies archive}} |
Search Wikipedia Clueless newbies archive | Blank form to search the Wikipedia Clueless newbies archive (2005-2006) |
{{google custom|en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost||Search Wikipedia Signpost}} |
Search Wikipedia Signpost | Blank form to search the Wikipedia Signpost
|
{{Google custom|en.wikipedia.org/wiki/Wikipedia:FAQ||Search all FAQs}} |
Search all FAQs | Blank form to search WP:FAQ and subpages[1] |
{{google custom|en.wikipedia.org/wiki/Wikipedia:Village_pump||Search Wikipedia:Village pump}} |
Search Wikipedia:Village pump | Blank form to search only the "main" does find archives from July 2002 - July 2004 )
|
{{google custom|en.wikipedia.org/wiki/Wikipedia:Village_pump_(policy)||Search Wikipedia:Village pump (policy)}} |
Search Wikipedia:Village pump (policy) | Blank form to search the Village pump (policy) section and its archive pages
|
{{google custom|en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)||Search Wikipedia:Village pump (technical)}} |
Search Wikipedia:Village pump (technical) | Blank form to search the Village pump (technical) section and its archive pages
|
{{google custom|en.wikipedia.org/wiki/Wikipedia:Village_pump_(||Search Wikipedia:Village pump (}} |
Search Wikipedia:Village pump ( | Use the ( character as a search delimiter to trick Google into searching all Village pump sections |
{{google custom|en.wikipedia.org/wiki/Wikipedia_talk:AutoWikiBrowser||search the AutoWikiBrowser discussion archive}} |
search the AutoWikiBrowser discussion archive | Blank form to search the AutoWikiBrowser discussion archive |
{{google custom|en.wikipedia.org/wiki/Wikipedia:Reliable_sources/Noticeboard||search the Reliable sources noticeboard archive}} |
Reliable sources noticeboard archive | Blank form to search the Reliable sources noticeboard archive |
{{google custom|en.wikipedia.org/wiki/Wikipedia:Template_messages||search Wikipedia's template messages}} |
search Wikipedia's template messages | Blank form to search the Wikipedia:Template messages subtree
|
As of October, 2008, Wikipedia's internal search became able to search on subpage trees. {{Search subpages link}} uses this new Wikipedia search feature, and works in some cases where Google search does not.
Problem with the Talk: namespace
Google searches (both {{
Type this | To get this | What it produces, or searches for |
---|---|---|
{{google custom|en.wikipedia.org/wiki/Talk:Psychokinesis||Search Talk:Psychokinesis}} |
Search Talk:Psychokinesis | Blank form to search Talk:Psychokinesis and its subpages - does not work |
{{google custom|en.wikipedia.org/wiki/Talk:Psychokinesis/||Search Talk:Psychokinesis}} |
Search Talk:Psychokinesis | Blank form to search Talk:Psychokinesis and its subpages - does not work, with or without the trailing slash |
{{google custom|en.wikipedia.org/wiki/Talk:||Search the Talk: namespace}} |
Search the Talk: namespace | Blank form to search Talk: namespace - does not work |
Googling for clues: google does not index wikipedia talk pages found this blog post by User:Cumbrowski:
- All Wikipedia Links Are Now NOFOLLOW, January 21st, 2007 by CarstenCumbrowski
which includes a comment posting that says "Google excluded the talk pages from the index". This probably means article talk pages, since Google is still indexing talk pages for non-article pages. {{Google custom}} therefore will not work on the Talk: namespace.
Wikipedia's internal search can search all of Wikipedia's talk pages. Use {{Search link}} to generate a link to search an entire talk namespace, and {{Search subpages link}} to search a subpage tree within a talk namespace on Wikipedia.
Other Wikipedia exclusions
See Wikipedia's
Problem with moved pages
If a page was originally at a name that is now a
This is not a problem when you search on all of the English Wikipedia, or on the entire Wikipedia:
It may be possible to fix this problem by changing redirects such as
Repetitive searches
If you need to create a large number of search links on a particular subset of Wikipedia pages, you can save much typing by making a new template. See {{
See also
- {{Google}}
- {{Google books}}
- {{Google custom}}
- {{Google help desk}}
- {{Google images}}
- {{Google LC}} (Google—excluding Language, Country)
- {{Search for}}
- {{Find sources}}
- {{Google scholar}}
- {{Google Scholar ID}} - for individual profiles
- {{Google trends}}
- {{Google translation}}
- {{Google Wikipedia}}
- {{Help desk searches}}
- {{Translate wikipedia}}
- {{Knowledge Graph
- Google Co-op- information about the Google custom search engine
- searchwhich are similar to some Google search features
- {{Search subpages link}} - searches subpage trees on Wikipedia using the internal search feature
Notes
- ^ As of 26 September 2008[update], Google custom search on several FAQ subpages does not work, because Google treats them as duplicates of older pages outside the WP:FAQ tree which are now redirects. See the discussion in Wikipedia:Village pump (technical)/Archive 48#How Google handles page moves on Wikipedia.
External links
- Google custom search engine (official site with documentation).