3

Introduction

I'm working on a project where a website exists out of 2 languages: nl and fr. The website itself is developed in ASP.NET where every page only exists once where the content of the page is dynamically loaded using localization.

Site structure:

NameOfThePage.aspx
AnotherNameOfThePage.aspx
...

All of these files are located under the root folder of the website, so their is no /nl/ or /fr/ subfolder.

Using a url param ?lang=nl the content of nl is loaded, if its ?lang=fr then the content of the fr is loaded.

Also meta tags, title, ... are beeing translated dynamically using the localization.

URL rewriting

For nice urls I use url rewriting like this:

http://www.example.be/nl/keyword-in-nl/
http://www.example.be/fr/keyword-in-fr/

Rewrite rules:

RewriteRule ^/nl/keyword-in-nl/ NameOfThePage.aspx?lang=nl
RewriteRule ^/fr/keyword-in-fr/ NameOfThePage.aspx?lang=fr

These nice urls are located in my website, sitemap and are indexed by Google. Also using the Webmaster tools > Fetch as Google, I get the correct content in the correct language.

Problem

The site is not scoring good in Google so I am searching for the problem. I read in blogs that using ?lang= param is not done for getting the language content. But I use nice urls using the url rewriting.

  • Is this still the same and must this be changed or...?
  • Can this be the problem of my bad scooring results in Google?

Also I read about hreflang to link alternative pages in different languages to each other.

  • Should I use hreflang link elements in my case?

1

As for scoring in google do this: Add each site to google webmaster tools.

Google Webmaster Tools (Multiple Profiles To Track Your Progress)

So in google webmater tools you create two seperate sites profiles. You can target each site based on geographic region, but webmaster tools doesnt yet allow targeting by language. As you can see the domain in webmaster tools can also include a directory.

www.example.be/nl/

www.example.be/fr/

As for internationalization, it really works best when you are able to target multiple countries. When you have two different language versions of your site, google usually just presents them the default language. You can get around this a bit by using language tags.

What you would do on each page is DROP THE CANONICAL LINK if you have it and then replace it with.

<link rel="alternate" hreflang="be-nl" href="http://www.example.com/nl/thispage.aspx/" />

<link rel="alternate" hreflang="be-fr" href="http://www.example.com/fr/thispage.aspx/" />

This will let google bot know there are two versions of your the same page tailored for different languages. Its a good start, because it removes the risk of having duplicate content and also is a good foundation for internationalization further.

Give your users a choice to switch language.

What we do is show the globe icon and let users choose another region. In your case you want to do something like this and let them switch languages. Do not use a 302/301 redirect for this. Just use a regular link with Hreflang attribute in it.

We also take things a step further and detect the users region the first time they visit our site. For example if they are from Belgium we pop up a banner in French (our only language for BE) and ask them if they want to go to the french version of the page. We use cookies to make sure this banner only shows if cookies are enabled, and if the user has not already been prompted.

Summary

Adding the Webmaster tools profiles to your two sub sites will give you insight to any crawling issues per language. Make sure that your content is actually human translated, and not just translated via bot (google is smart enough to catch machine translation and they say it deters results). Also might want to consider going with a general .com domain if you can. This will allow you to internationalize further (targeting multiple regions) if the need arises. Being locked into a .be domain will confuse google to thinking that you are only targeting 1 country (if that is the case, ignore my comment about it).

Feel free to comment with any questions.

  • About the language tags you mentioned href="http://www.example.com/nl/thispage.aspx/". You mean in my example href="http://www.example.com/nl/keyword-in-nl/" that is pointing to the correct page using rewrite rules? Also does this mean that the param ?lang= is not bad in my case because of the rewrite rules? – Mivaweb Aug 14 '14 at 6:17
  • yes I meant /keyword-in-nl/ versus thispage.aspx, although you would have to write some rewrite rules or have some sort of url mapping scheme in place to have the actual url segments translated. The way we do it is site.com/ru/article/401/{ARTICLE TITLE IN RUSSIAN} so that our rewrite rules look up /article/401/ as the article and are able to serve it with the correct language. I am not sure what you mean by by param ?lang=. I think you are referring to the querystring parameters? With Rewrite Google will never see these, because you are not redirecting but rewriting. They are internal – Frank Aug 14 '14 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.