Link to home
Start Free TrialLog in
Avatar of peps03
peps03

asked on

SEO duplicate language url homepage, on multilingual site

Hi,

I have a website in 2 languages.
The language on the sub pages isn´t my issue because they are unique and have the language in the url, /en/ for example.

The homepage on the other hand, example.com, knows what language the use throught this script:
substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);

So example.com is the same as either example.com/en/ or example.com/nl/ depending on the default language of the users browser.

Is this bad for search engine (optimization)? what would you advice to do with this?

Thanks
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

If the pages are written in different languages, then it does not matter if they say the same thing, because they will not index as being duplicate.

Cd&
Avatar of peps03
peps03

ASKER

Thanks for your reaction.

I understand, but, example.com (say the browser is set to english) will serve this page in english then.
And  example.com/en/ is then also the same page as example.com. because the other links on the site will now contain the /en/ prefix. so when one is clicking around and returns to the homepage, the /en/ prefix will be added to the (homepage) url.

get what i mean?
ASKER CERTIFIED SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of peps03

ASKER

Ok! Thanks COBOLdinosaur.

It works! Great.
That's what I like about PHP; clean easy to implement solutions for most common problems.  Glad I could help.


Cd&