Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1491

Search Engine Optimization (Joomla! SEO) in Joomla! 4.x • Multilingual: "alternate" links are ok (UTF-8) but not the "canonical" link (ASCII)

$
0
0
Hello,

I have a live multilingual site, with English as the default language, and 5 other ones.

All links in the html <head> section of the articles are fine for the rel="alternate" hreflang="..." attributes:
<link href="https://mysite.com/url-en" rel="alternate" hreflang="en-GB">
<link href="https://mysite.com/de/url-de" rel="alternate" hreflang="de-DE">
<link href="https://mysite.com/fr/url-fr" rel="alternate" hreflang="fr-FR">
<link href="https://mysite.com/es/url-es" rel="alternate" hreflang="es-ES">
<link href="https://mysite.com/pt/urf-pt" rel="alternate" hreflang="pt-BR">
<link href="https://mysite.com/zh/url-zh" rel="alternate" hreflang="zh-CN">

All above URLs (url-de, url-fr, url-es, url-pt & url-zh) are UTF-8 with the right characters (ü, è, é, á, ó, â, 更, 统, 腺, 支, etc).

The problem is with the canonical link.

Below the rel="alternate" links, the rel="canonical" link is not UTF8 - for instance in Chinese (zh):
<link href="https://mysite/zh/%E6%9B%B4%E5%A4etc" rel="canonical">,
hence with ASCII encoding and all the "%" followed by two hexadecimal digits.

I don't understand why the canonical link is not correct (ASCII) when the line right above is ok (UTF-8): rel="alternate" for zh shows the right characters (更, 统, 腺, 支, etc).

I have tried in vain:
- Online search: old posts, Joomla forums, Stack Overflow, github, etc
- Browsers issue (Firefox, Chrome, Edge, cookies etc)
- Joomla setup: SEF & multilingual
- MySQL: all tables seem ok, with UTF-8 encoding
- Quick search on "canonical" in Joomla's code (not a pro but I have developed a component a few years ago) - no clue

Any help would be appreciated.
Thanks!

Statistics: Posted by StoneFree — Mon Nov 04, 2024 11:51 pm



Viewing all articles
Browse latest Browse all 1491

Trending Articles





<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>