I'm trying to set up a site search query for the Python 3.6 library reference page here:


I tried the following query:

site:docs.python.org/3 string

I get some relevant looking results, but it's not quite narrowed down enough. Using site:docs.python.org/3.6/library doesn't work at all.

Basically I want search results to match this wildcard pattern:


How can I get this to work with Google search?

1 Answer 1


Perhaps something like

site:docs.python.org inurl:3.6/library

That should limit results to being in the docs.python.org domain for pages with "3.6/library" somewhere in the URL.

  • Although, looking at what I'm getting back, I'm wondering if that part of their site is properly indexed by Google. I think they, either intentionally or by accident, are keeping Google from indexing that part of the site. Testing on other similar sorts of sites I'm getting good results.
    – ale
    Apr 19, 2017 at 17:53
  • 1
    Looking more, I see <link rel="canonical" href="https://docs.python.org/3/library/index.html" /> in their HTML source. That means they want the URLs to not contain the .6. This works great, though: site:docs.python.org inurl:3/library string.
    – ale
    Apr 19, 2017 at 17:58
  • Glad you got it working, but sadly this means I get duplicate results across multiple 3.x versions of Python: Same result for python 3.4, 3.5, and 3.6 for example. Was wanting to narrow it down to a specific version. Apr 19, 2017 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.