View Issue Details

IDProjectCategoryView StatusLast Update
0006798OXID eShop (all versions)4.09. SEO, SEO URLpublic2022-02-02 14:52
Reporterleofonic Assigned To 
PrioritynormalSeverityfeatureReproducibilitysometimes
Status confirmedResolutionreopened 
Product Version6.0.1 
Summary0006798: hreflang tags do not fit well with canonical tags
DescriptionHreflang tags use the same mechanism as the language dropdown, and both do not use the same urls as in canonical tag.
If hreflang tags are used together with canonical tags, it should be made clear what to index:
- hreflang tags should not be used on pages that point to a different url with a canonical tag
- pages that point to themselves with canonical tag should use the canonical tag versions in hreflang tags

This seems not so easy to fix because:
- method getCanonicalUrl does not take a language parameter.
- Oxid tries to guess language on the start page, so if you use the actual base url for language switching, you cannot go back to the default langauge.

Additionally, Oxid does not even use "startseite" and "en/home" on the start page anymore, instead oxid uses "index.php?cl=start" (since V6)
Steps To ReproduceDo a Google search for "demoshop oxid", the first result points to:
https://demoshop.oxid-esales.com/professional-edition/index.php?cl=start
This is the link from hreflang, so Google seems to ignore the canonical tag because hreflang differs.
TagsCanonical Link, SEO
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

QA

2018-02-23 16:22

administrator   ~0012395

I tested the scenario in Vivaldi browser, getting the url https://demoshop.oxid-esales.com/professional-edition/.
I tested again in Chrome browser and the url https://demoshop.oxid-esales.com/professional-edition/index.php?cl=start appeared.
Found out the difference is that I'm not logged in into my Google account in Chrome browser.

However, we are not able to prescribe which url to index. The search engines 'do what they want'. We can only try to request something but Google and co don't have to work as we wish they do.

So it is not completly clear what's the bug - I can't see anything OXID eShop 6 doing wrong. Maybe you could provide some more information to clarify the issue.

leofonic

2018-02-23 16:55

reporter   ~0012396

"We can only try to request something"

If there is one url given by canonical tag and a different url given by hreflang then you request contradicting things. You can see this in effect in the example search, Google does not index the url given in canonical as expected but instead the one given in hreflang.

So this should be changed:
- urls in canonical and hreflang should be equal for pages that shall be indexed.
- urls that shall not be indexed should not use hreflang

Also see https://www.rebelytics.com/hreflang-canonical/

QA

2018-02-26 09:23

administrator   ~0012397

Thank you for your response and clarification.

SvenBrunk

2022-02-02 14:52

administrator   ~0013727

<link rel="canonical" href="https://demoshop.oxid-esales.com/community-edition/">
<link rel="alternate" hreflang="x-default" href="https://demoshop.oxid-esales.com/community-edition/index.php?cl=start">
<link rel="alternate" hreflang="de" href="https://demoshop.oxid-esales.com/community-edition/index.php?cl=start">
<link rel="alternate" hreflang="en" href="https://demoshop.oxid-esales.com/community-edition/index.php?cl=start&lang=1">