This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: SEO: differentiate between Python 2 and Python 3 docs on Google SERP
Type: Stage: resolved
Components: Documentation Versions: Python 3.10
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, gr3web, khaled, mdk, mixy-design, simonw, willingc
Priority: normal Keywords:

Created on 2020-05-08 14:35 by simonw, last changed 2022-04-11 14:59 by admin. This issue is now closed.

File name Uploaded Description Edit
sqlite3_row_-_Google_Search.png simonw, 2020-05-08 14:35
Screenshot_2020-09-07 sqlite3 row at DuckDuckGo.png mdk, 2020-09-07 12:20
Messages (5)
msg368442 - (view) Author: Simon Willison (simonw) * Date: 2020-05-08 14:35
When I search Google for a Python related term (e.g. "sqlite3 row" - see attached screenshot) I get back two results - one for the Python 2 documentation and one for the Python 3 documentation.

There is currently no indicator which result is for which version of Python.

Comparing with I think the problem is the way the title elements are designed:

sqlite3 — DB-API 2.0 interface for SQLite databases — Python 3.8.3rc1 documentation


11.13. sqlite3 — DB-API 2.0 interface for SQLite databases - Python 2.7.18 documentation

As you can see in the attached screenshot, Google (at least in my desktop browser) chooses to truncate those titles before they get to the bit indicating the version of Python.

It may be worth consulting with Google directly about the best way to address this. Moving the Python version indicator to the start of the title may or may not be the best approach.
msg368448 - (view) Author: Simon Willison (simonw) * Date: 2020-05-08 15:45
I asked about this on Twitter and got a couple of tips from Google engineers:

It sounds like a good solution would be to explicitly design the breadcrumbs using this mechanism:

Maybe " > Python 3.8 > sqlite3" would be a good fix here?
msg376479 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2020-09-07 12:20
Hi Simon, thanks for reporting!

This looks like a Google issue, not a Python documentation issue: Google tries to deduce something better than the URL to display to the user, and fails, please open the issue on the Google bug tracker instead.

(As a side note, DuckDuckGo displays it correctly (see attached screenshot).)
msg377151 - (view) Author: Pinto (khaled) Date: 2020-09-19 07:18
Merci Julien j'ai reussi à régler le même problème rencontré sur mon site
msg379826 - (view) Author: Edouard Moine (mixy-design) Date: 2020-10-28 10:17
Hey Simon, you can use the breadcrumb markup and other markups structured data with json on your webpage if you want google to read more efficiently your page in the browser. I used it on my <a href="">web agency website</a> if you want to have a look at the structure ;)
Date User Action Args
2022-04-11 14:59:30adminsetgithub: 84742
2020-10-28 10:17:50mixy-designsetnosy: + mixy-design
messages: + msg379826
2020-09-19 07:18:56khaledsetmessages: + msg377151
2020-09-08 12:56:20zach.waresetmessages: - msg371208
2020-09-08 12:55:59zach.waresetmessages: - msg376478
2020-09-07 12:20:04mdksetstatus: open -> closed
files: + Screenshot_2020-09-07 sqlite3 row at DuckDuckGo.png
messages: + msg376479

resolution: not a bug
stage: resolved
2020-09-07 12:04:26gr3websetnosy: + gr3web

messages: + msg376478
versions: + Python 3.10, - Python 3.9
2020-06-10 14:55:45khaledsetnosy: + khaled
messages: + msg371208
2020-05-08 15:45:48simonwsetmessages: + msg368448
2020-05-08 15:36:43ned.deilysetnosy: + willingc, mdk
2020-05-08 14:35:12simonwcreate