Skip to content

fix(hreflang): Updating hreflang implemenation

Miracle Banks requested to merge hreflang-update into main

Step 1: What is changing in this MR?

Most globalised URLs no longer contain the correct or are missing hreflang implementation since the CMS migration. These changes occurred October 19 - Nov 3, 2023

Common errors include:

  1. Self-referencing hreflang not present - the hreflang implementation needs to specify both the preferred audience for the page itself, and its translated variants
  2. Include non-region hreflang alternatives to target language speakers in multiple locations. For example German speakers in Switzerland.
  3. Remove data-hid="i18n-alt-de-de" from the implementation. This must be formatted <link rel=”alternate” hreflang=”x” href=”https://example.com/alternate-page” /> with no additional code.
  4. Ensure that previously broken hreflang urls are fixed for translated and untranslated pages
  • Non-language examples with broken hreflang URLs previously
  • Language variants with previously broken hreflang URLs (fr and de):
Production Review app
https://about.gitlab.com/ https://hreflang-update.about.gitlab-review.app/
https://about.gitlab.com/jobs/ https://hreflang-update.about.gitlab-review.app/jobs/
https://about.gitlab.com/events/ https://hreflang-update.about.gitlab-review.app/events/
https://about.gitlab.com/topics/ci-cd/ https://hreflang-update.about.gitlab-review.app/topics/ci-cd/
https://about.gitlab.com/resources/ https://hreflang-update.about.gitlab-review.app/resources/
https://about.gitlab.com/topics/version-control/what-is-gitlab-flow/ https://hreflang-update.about.gitlab-review.app/topics/version-control/what-is-gitlab-flow/
https://about.gitlab.com/fr-fr/free-trial/ https://hreflang-update.about.gitlab-review.app/fr-fr/free-trial/
https://about.gitlab.com/de-de/solutions/continuous-integration/ https://hreflang-update.about.gitlab-review.app/de-de/solutions/continuous-integration/
https://about.gitlab.com/de-de/ https://hreflang-update.about.gitlab-review.app/de-de/
https://about.gitlab.com/ja-jp/sales/ https://hreflang-update.about.gitlab-review.app//ja-jp/sales/
https://about.gitlab.com/fr-fr/solutions/devops-platform/ https://hreflang-update.about.gitlab-review.app/fr-fr/solutions/devops-platform/

Step 2: Ensure that your changes comply with the following, where applicable:

  • I, the Assignee, have run Axe tools on any updated pages, and fixed the relevant accessibility issues.
  • These changes work on both Safari, Chrome, and Firefox.
  • These changes have been reviewed for Visual Quality Assurance and Functional Quality Assurance on Mobile, Desktop, and Tablet.
  • These changes work with our Google Analytics and SEO tools.
  • These changes have been documented as expected.

Build Variables:

  • Use Contentful Preview API
Edited by Miracle Banks

Merge request reports