0

Im working on a news site that is created with jsp. I would like to change the link structure using the "title" of news, not only their IDs.

At the following screen shot, the website puts the exact title to the URL although it has some different characters

enter image description here

I would like to generate url like: mydomain.com/news/id-title

I have some question about that :

1- Is it a correct approach using the url like this with different characters ? If not, how can I create URL for a Russian title (completely different characters) ?

2- Should I change these characters ? advantages, disadvantages ? (according to SEO)

3- Putting the title to URL has any benefit for SEO if we compare with the URL that is created only content ID ?

anL
  • 1,073
  • 1
  • 11
  • 31

2 Answers2

0

The approach is good but I would recommend against using special language characters in URLs, it often leads to errors and confusion, unless they are parameter values which often needs to hold special values (but even in those cases it's better to restrain from using special characters).

Instead if would be good to use the English title for example.

For example take a look at this example:

http://www.teamliquid.net/forum/starcraft-2
        /437452-scelight-50-run-without-java-merged-accounts?page=21

Much readable, doesn't depend on who sees it, also if you use services like Google Analytics, the resource/page is directly readable from the URL etc.

icza
  • 389,944
  • 63
  • 907
  • 827
  • thanks for reply. But how can I generate a Russian content link in this case ? The title consists of completely different letters. Should I convert it letter by letter ? – anL Nov 04 '14 at 12:07
  • @anL One simple way would be to create a simple mapping: 1 (or 2) English letter for each Russian letter. – icza Nov 04 '14 at 12:11
  • if it stays in its original Russian form, does Google not index them ? Why it has to be in english if I handle them in my side without any problem ? – anL Nov 04 '14 at 14:05
  • @anL The key is not the English language but rather the characters you use in URLs. The Letters of the English alphabet are all allowed in URLs without escaping them. – icza Nov 04 '14 at 14:10
0

[Stack Overflow is not the correct place for SEO advice (these questions are off-topic here). You could ask it on Webmasters SE, but this question is most likely answered there already. So my following answer will leave out any SEO aspects.]

You have to percent-encode the URL:

  • Some characters are allowed directly (e.g., a-z, A-Z, 0-9 etc.) -- you don’t have to percent-encode them,
  • some characters are allowed directly but have a reserved meaning -- you only have to percent-encode them if you don’t want this meaning,
  • and most characters are not allowed (including everything non-ASCII) -- you always have to percent-encode them.

Check the URI specification to learn which characters are allowed in which component.


Most programming languages have methods for percent-encoding URLs. For JSP, see for example these questions:


Take for example the Russian Wikipedia page about bees. In your browser’s address bar, the URL will most likely look like

http://ru.wikipedia.org/wiki/Пчёлы

But the real URL is

http://ru.wikipedia.org/wiki/%D0%9F%D1%87%D1%91%D0%BB%D1%8B

You can easily check this yourself by copy-pasting the URL from the address bar to a text document.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360