Having a sitecore website. Situation is for every country, there are two URLs that you can use to hit the homepage.
www.abc.com/en/home and www.abc.com/en
We only want one - this is bad for both SEO and analytics. I want to retire www.abc.com/en/home and want www.abc.com/en to only work.
I already worked with embedded URL = always in web.config but didnt worked for me, Please help asap.
Best How To :
If you use LanguageEmbedding.Always in the LinkManager. Links generated with the Sitecore LinkManager have always a language code. But the other urls will also work.
You can use a Canonical see Tip 17 for search engines.
Or you can do a redirect if the url not match with the url you want.
Or block/redirect the url's in you netwerk/loadbalancer/webserver or redirect module or Sitecore
<httpRequestBegin>pipeline. (just what you find convenient)
A simple solution is place a peace of code in your master page something like this:
string baseUrl = LinkManager.GetItemUrl(Sitecore.Context.Item);
if (baseUrl != Request.Path)
Also works for url aliases.