Skip to content

KAFKA-20265: Add canonical URL tags to Kafka Javadoc pages to point search engines to suggest latest stable version#823

Open
MartijnVisser wants to merge 2 commits intoapache:markdownfrom
MartijnVisser:KAFKA-20265-canonical-tags
Open

KAFKA-20265: Add canonical URL tags to Kafka Javadoc pages to point search engines to suggest latest stable version#823
MartijnVisser wants to merge 2 commits intoapache:markdownfrom
MartijnVisser:KAFKA-20265-canonical-tags

Conversation

@MartijnVisser
Copy link
Copy Markdown

@MartijnVisser MartijnVisser commented Mar 9, 2026

Some examples of Javadocs that are currently ranked for older versions:

RetriableCommitFailedException is shown for 2.5.0 instead of 4.2.0
image

ConsumerRebalanceListener is shown for both 2.5.0 and 2.3.0 instead of 4.2.0
image

AdminClient is shown for 2.6.0 instead of 4.2.0
image

Add a bash script that inserts/updates <link rel="canonical"> tags in
all Javadoc HTML files across all versions, pointing to the latest
stable version. This points search engines to use the latest stable
versions of the API docs and consolidates SEO ranking signals.

When a Javadoc page doesn't exist in the latest version (e.g., a
removed API), the script points the canonical URL to the newest
version that still contains the page, instead of pointing to a 404.

Also update README.md to document the new step in the release process.
Run add-javadoc-canonical-urls.sh to add <link rel="canonical"> tags
across all existing Javadoc HTML files in static/*/javadoc/. Pages that exist in the latest version (42) get a canonical pointing there. Pages for removed APIs point to the newest version that still contains them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant