Forum Moderators: open
URL length for usability: Short. :)
(No shift-key or special characters, and if you can't read it aloud on the radio or telephone and have the listener write it down correctly, then it likely needs improvement)
Jim
According to the resource that jdMorgan linked to above, the only unreserved (and always safe) characters are:
ALPHA / DIGIT / "-" / "." / "_" / "~"
I also suggest avoiding three of those unreserved characters as much as possible:
However, if you do URL rewriting, then you are applying an additional 'small program' that understands part of the meaning of reserved characters.
As a result, should you decide to use URL rewriting and a hierarchical URL format, it would be acceptable to use something like
example.com/watch/swiss/15k/1.2-inch
Note that the 'keywords' are most-important/competitive first, as well as establishing a top-down product URL classification system, and/so that they appear to indicate a 'directory' structure. I also dumped the uppercase "K" in favor of the better-usability lowercase character.
However, as noted, this approach will only work if you use URL rewriting; otherwise the server will have no idea how to handle a 'filetype' of ".2-inch".
Another reason to avoid underscores is that they are hidden_by link_underlining [webmasterworld.com] and therefore may appear to simply be spaces (If this isn't clear, copy and paste the immediately-preceding linked text into a plain-text editor and examine it).
Just some ideas...
Jim
In case you BNF is rusty, in the path section you're allowed:
A-Z
a-z
0-9
$ - _ . +
! * ' ( ) ,
Rest needs to be %-escaped
This is updated in RFC3986
it allows:
a-z
A-Z
0-9
- . _ ~
: @ ! $ & ' ( ) * + , ; =
But I'd really stick to the smallest set.
like:-
Avoid the underscore character [_] because it is a challenge to search engines. (reference)Avoid the period or dot [.] except in the hostname and immediately preceding the file extension. It is not common in the rest of the url and can cause user confusion
Avoid the tilde [~] because you cannot "read it aloud on the radio or telephone" and have the average person know what you mean.
No shift-key or special characters, and if you can't read it aloud on the radio or telephone and have the listener write it down correctly, then it likely needs improvement