6

I am wondering how to handle URLs which correspond to strings containing diacritic (á, ǚ, ´...). I believe what we're seeing mostly are URLs where diacritic characters where converted to their closest ASCII equivalent, for instance Rånades på Skyttis i Ö-vik converted to ranades-pa-skyttis-i-o-vik.

However depending on the corresponding language, such conversion might be incorrect. For instance in German, ü should be converted to ue and not just u, as seen with the below URL representing the Bayern München string as bayern-muenchen:

http://www.bundesliga.de/en/liga/clubs/fc-bayern-muenchen/index.php

However what I've also noticed, is that browsers can render non-ASCII characters when they are percent-encoded in the URL, which is the approach Wikipedia has chosen, for instance http://de.wikipedia.org/wiki/FC_Bayern_M%C3%BCnchen which is rendered as:

enter image description here

Therefore I'm considering the following approach for creating URL slugs:

-(1) convert strings while replacing non-ASCII characters to their recommended ASCII representation: Bayern München -> bayern-muenchen
-(2) also convert strings to percent encoding: Bayern München -> bayern_m%C3%BCnchen
-create a 301 redirect from version (1) to version (2)

Version (1) URLs could be used for marketing purposes (e.g. mywebsite.com/bayern-muenchen) but the URLs that would end being displayed in the browser bar would be version (2) URLs (e.g. mywebsite.com/bayern-münchen).

Can you foresee particular problems with this approach? (Wikipedia is not doing it and I wonder why, apart from the fact that they don't need to market their URLs)

3
  • Although I cannot see any big problem, I cant see why you would need the redirect. Redirecting 301 will lose a tiny portion of link-juice in the process, would you still market your ASCII url even though it would be 301d to the UTF version? Wouldnt it be just better to use your UTF version even for link building/marketing?
    – milo5b
    Commented Aug 5, 2012 at 16:44
  • @milo5b: Could you clarify what you mean by "will lose a tiny portion of link-juice in the process" please? what I'm afraid of with marketing the UTF version is that the URLs get messed up during the process (I see that every now and then, even on notorious websites whereby UTF-8 is not rendered properly. As for marketing percent-encoded URLs that's out of the question, it's just unreadable.
    – Max
    Commented Aug 6, 2012 at 8:01
  • if site A that is linking to your site with no 301, you will get a specific amount of link-juice from it (it's not so straightforward to determine, but the amount will depend on the page's Page Rank, how many links are on it, etc etc). If site A links to your to-be-redirected URL, you will only get 90% or so of the link-juice available (because of the redirection). It' tiny, but still something. Would you need to display the url on a page? If the anchor text says, for example, Bayern Muenchen, then you could point at the UTF URL version (which would be be URL-encoded).
    – milo5b
    Commented Aug 6, 2012 at 8:13

3 Answers 3

1

When using international characters in your URLs there are a few issues to be aware of:

  • Percent URL encoding requires a character set. To display the URL correctly in the web browser, you should use "UTF-8" character set when percent URL encoding your slug. See: What is the proper way to URL encode Unicode characters?
  • If there are lots of encoded characters in your URL, it can make the URL significantly longer. Here is an example with lots of Japanese characters shown in international text and with URL encoding:
    • http://www.dmoz.org/World/Japanese/オンラインショップ/地域別・エスニック/アジア/日本/
    • http://www.dmoz.org/World/Japanese/%E3%82%AA%E3%83%B3%E3%83%A9%E3%82%A4%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%97/%E5%9C%B0%E5%9F%9F%E5%88%A5%E3%83%BB%E3%82%A8%E3%82%B9%E3%83%8B%E3%83%83%E3%82%AF/%E3%82%A2%E3%82%B8%E3%82%A2/%E6%97%A5%E6%9C%AC/
  • Your URL may not always be shown with international characters. There are some cases in which your URL will display encoded with lots of % signs.
    • Older browsers
    • When the URL is copied and pasted (for example into forums)

Removing diacritics in URLs may be OK, but it is not possible for all international characters (like Chinese and Japanese). It may also be language dependent: ü may be replaced by ue in German, but by just a plain u in some other language.

0

I would go for the first approach, namely:

  1. replace all diacritics by their understandable counterparts in the given language (for instance, Münschen to Munschen),
  2. then remove all the remaining diacritics by replacing them with the non-accentuated latin-1 letters
  3. then replace the spaces by dashes (and multiple dashes by single ones).

Then your URLs will be readable by your visitors and packed with Search Engine food.

-1

Just make your prefered choice the canonical page then there will be no discussion, however your drop in link juice transfer is minimal, use the formula that the user who type using the diacritic will want to end up on the diacritic.... then you will definitly be maximizing your potential :-)

1
  • What do you mean by "your drop in link juice transfer is minimal"?
    – Max
    Commented Oct 10, 2012 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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