Jump to content
rule

International SEO

Recommended Posts

We would like to ensure that foreign language versions of our website are served correctly for purposes of international SEO. Default code structure is below.

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Größentabelle</title>
<base href="https://domain.com/">
<link rel="canonical" href="https://domain.com/size-chart.php/de" />
</head>

The reason we suspect this not to be entirely correct is because many analytics tools also require a hreflang attribute (e.g. hreflang="de-de"). Not sure how big of a deal it is for the search engines.

Is there a way to modify osC output to be consistent with the above?

Share this post


Link to post
Share on other sites

of course there is, but you need to seek out a capable SEO which you won't necessarily find here. And there is not enough information provided to give a credible response to whatever you're trying to achieve.

Share this post


Link to post
Share on other sites

@Hotclutch What additional information is required?

This is not an SEO question per se. We just need to modify core code to add the hreflang attribute. Does anyone know how to do this?

Share this post


Link to post
Share on other sites

https://moz.com/learn/seo/hreflang-tag

It works similarly to rel="canonical".

Is your actual content multi-lingual or only boiler plate text. Boiler plate text refers to things like login buttons. The things you find in language packs. If that's the only things that are multi lingual on your site then maybe you don't need to implement this tag at all. It could just result in creating more duplicate content.

 

Share this post


Link to post
Share on other sites

@JcMagpie That's exactly what we are after. Adding hreflang itself is easy but making it take different forms (en-us, de-de, fr-fr) is what we are not sure about. How would we make the attribute take different values depending on the language selected?

@Hotclutch Our content is actually multi-lingual. Not just boiler plate.

Share this post


Link to post
Share on other sites

I'd have thought a HT (Header Tag) module would do all that you need?

In the HT (in the admin side), read your installed languages and for each one have a input box for en-us, de-de etc

EN => en-us
DE =>  de-de
FR => fr-fr
and so on

In the shop side, output those in the appropriate format.

Seems relatively straightforward and no code changes, just a module to upload and turn on.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites
1 hour ago, burt said:

I'd have thought a HT (Header Tag) module would do all that you need?

In the HT (in the admin side), read your installed languages and for each one have a input box for en-us, de-de etc

EN => en-us
DE =>  de-de
FR => fr-fr
and so on

In the shop side, output those in the appropriate format.

Seems relatively straightforward and no code changes, just a module to upload and turn on.

That should do it. Then you will have to apply your mind to how the canonical tag module should be adapted so that the 2 tags don't work against each other.

Edited by Hotclutch

Share this post


Link to post
Share on other sites
On 2/27/2019 at 7:35 PM, Hotclutch said:

Then you will have to apply your mind to how the canonical tag module should be adapted so that the 2 tags don't work against each other.

Good point. This is probably the most important issue here, since it may directly affect a website's indexing.

@burt any ideas on how to make the two compatible?

Share this post


Link to post
Share on other sites
Just now, rulegacy said:

 any ideas on how to make the two compatible?

No I don't - SEO is not my field of expertise.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

every website's SEO requirement is different. An answer can only be provided after analyzing your site. 

Share this post


Link to post
Share on other sites

https://support.google.com/webmasters/answer/182192?hl=en

Use different URLs for different language versions

Google recommends using different URLs for each language version of a page rather than using cookies or browser settings to adjust the content language on the page.

Having just checked a stock CE install with 2 languages it apperes to generate the same URL which ever language is used! Or am I missing somthing?


 

Share this post


Link to post
Share on other sites

No that only apperes once when you first select the new lang, after that the URL's are the same as in english? When you check the html with the new language you see

<html sv>

English just gives this.

<html >

 

This is just stock with 2 languges no other changes.

 


 

Share this post


Link to post
Share on other sites

there are issues with the stock osC. some of them are fixed by simply installing SEO URLs. The canonical HT module also should not be used.

Share this post


Link to post
Share on other sites

 

4 minutes ago, Hotclutch said:

fixed by simply installing SEO URLs

Doing that soon so will check how that immproves things.

image.png


 

Share this post


Link to post
Share on other sites
On 3/1/2019 at 1:35 PM, Hotclutch said:

The canonical HT module also should not be used.

Are you referring to Canonical Header Links? Why not?

As for Google, their main recommendation is the use of the following HTML tags.

<link rel="alternate" hreflang="lang_code" href="url" />
<link rel="alternate" hreflang="x-default" href="default_url" />

The difficulty with our setup is that we use SEO URLs, which rewrites product and category names with /de preceding the German versions. How could we make an HT module insert such tags dynamically based on the selected language?

Share this post


Link to post
Share on other sites
8 minutes ago, rulegacy said:

Are you referring to Canonical Header Links? Why not?

Configuration of the canonical tag is something that must be left to the webmaster alone. In the case of the HT module, it outputs a tag that is not correct. It would be very difficult to code a module that tries to take into account all possible permutations.

As an example, your shop is multi-lingual, and the module excludes the language parameter, which would be incorrect configuration.

The module is useful in so far as having a piece of code that can be modified by experienced webmasters, but its not good for amateur webmasters who just activate it and assume that it is doing the proper job, which it does not in most cases.

16 minutes ago, rulegacy said:

As for Google, their main recommendation is the use of the following HTML tags.


<link rel="alternate" hreflang="lang_code" href="url" />
<link rel="alternate" hreflang="x-default" href="default_url" />

The difficulty with our setup is that we use SEO URLs, which rewrites product and category names with /de preceding the German versions. How could we make an HT module insert such tags dynamically based on the selected language?

As i said before, somebody needs to look at your site (preferably an SEO). If that person cannot code, they can provide the guidance for a coder. You can then approach a coder to develop the HT module for you.  

Share this post


Link to post
Share on other sites
51 minutes ago, rulegacy said:

Are you referring to Canonical Header Links? Why not?

To be clear, i mean the HT module that comes with the CE should not be used.

Canonical header links in general can of course be used.

Share this post


Link to post
Share on other sites

This page might be of interest as an overview: https://moz.com/learn/seo/hreflang-tag

They state: "Google recommends not using rel="canonical" across country or language versions of your site. But you can use it within a country or language version". I work only in English, so I can't tell you what exactly that implies, or what best practices are.

Share this post


Link to post
Share on other sites

think i have done this as an extension to seo urls, gotta dig up some code ...


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

Funny how the same problem keep going round and round!

One for the experts! could this not be sorted using mod_rewrite?

RewriteRule /(?!en|es|de|fr|it)(/?.*)$ http://www.mydomain.com/en/$1 [R=301,L]

After all google says either unique URL or coanonical tags will do.


 

Share this post


Link to post
Share on other sites
16 hours ago, Hotclutch said:

To be clear, i mean the HT module that comes with the CE should not be used.

Canonical header links in general can of course be used.

Could you please clarify the exact name of the HT module that should not be used? Doesn't look like we have it enabled but just want to make sure.

3 hours ago, bruyndoncx said:

think i have done this as an extension to seo urls, gotta dig up some code ...

That would be much appreciated.

Share this post


Link to post
Share on other sites
On 3/3/2019 at 2:55 PM, Hotclutch said:

ht_canonical.php

Wait. This file is the Canonical Header Links module we discussed above when you said it was fine to keep it on. So should it be disabled or not and why?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×