[1.0.x] Alternative Hreflang for SEO

Created on 20 January 2025, 3 months ago

Alternative Hreflang for SEO is a Drupal module that allows the language code in hreflang attributes to be customized, without writing any code and without altering the registered langcode used in the website's URLs. This might be needed when you (or a previous developer) have added a custom language to the site with a custom langcode and you have since been advised there is a more suitable ISO language code for the hreflang attribute, but you do not want to repoint all of your existing pages.

The module provides an admin settings form which lists all of the languages enabled on the website and allows the language codes to be customised for the hreflang attribute only. The settings form enables a site owner or SEO agency, when granted the relevant permissions, to make changes to the hreflang language codes without needing a developer to add code to a custom module.

Project link

https://www.drupal.org/project/seo_alt_hreflang

Similar modules

The key difference between this project and https://www.drupal.org/project/hreflang is that if you want to alter the language code in the hreflang element, then Hreflang requires code to be written in a custom module whereas this module does not. Hreflang might be a better starting point for developers who want full control over the code and would like to do more with the hooks they are writing; this is a simple implementation to assist non-developers.

📌 Task
Status

Active

Component

module

Created by

🇬🇧United Kingdom kewesley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024