RingaedorOpenCart extensions

Guides

OpenCart hreflang and translated SEO URLs: a practical guide

Translating your OpenCart store is only half of the work. If Google does not understand which page belongs to which language, it may show your English product to a German customer, or treat the translations as duplicate content. This guide covers the two things that fix it: translated SEO URLs and hreflang tags.

1. Translated SEO URLs

OpenCart stores one SEO keyword per product, category and page for each language. If you add a language without translating them, every language uses the same English keywords. A translated keyword helps the page rank for the words people search in that language:

Rules that avoid problems:

Enable them in System > Settings > Server > Use SEO URLs (on Apache rename .htaccess.txt to .htaccess).

2. Language in the URL (OpenCart 4)

OpenCart 4 puts the language code in the URL (/de-de/...), so each language version has its own address. This is what makes hreflang possible. OpenCart 3 keeps the language in the visitor's session instead, with the same URL for all languages, so search engines usually see only one language.

3. hreflang tags

hreflang tags are lines in the page <head> that list every language version of the same page:

<link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/running-shoes"/>
<link rel="alternate" hreflang="it-IT" href="https://example.com/it-it/scarpe-da-corsa"/>
<link rel="alternate" hreflang="x-default" href="https://example.com/en-gb/running-shoes"/>

Common mistakes:

Automating both

Doing this by hand for every product is tedious and easy to get wrong. AI Translator for OpenCart creates the translated SEO keyword for every product, category and page when it translates them (unique per store, with the translated parent path, and without ever changing keywords you typed yourself), and on OpenCart 4 it adds correct hreflang and x-default tags to every public page.

See it on a live store: the OpenCart 4 demo storefront has Italian and Arabic versions with hreflang tags (view the page source), and you can try the admin with user demo, password demo. More in the documentation and in our guide on making an OpenCart store multilingual.

The extension used in this guide

AI Translator

Add a new language and translate your whole store with DeepL, Azure, ChatGPT or Claude.

Details Try the live demo