Commas in URL

Are there any reasons to not use a comma (, <- one of these fellas ;)) in a URL?

For example,,123,3.html ?

Sean :slight_smile:

I’ve never heard of a problem with commas, I personally wouldn’t use them because I don’t think they’re a standard URL character.

I seem them on a lot of news/archived sites… doesn’t appear to be a problem, but as aspen said… you might as well need them… and surely you don’t NEED to use them.

Thanks both. Perhaps somebody cleverer than me can tell me what this has to say on the issue

Sean :slight_smile:

Looks like a comma is okay according to that document – I still wouldn’t use one though.

Any reasons apart from your previous post Chris?

Sean :slight_smile:

They just seem like a good way to confuse visitors. I don’t think most people are used to typing commas in URLs.

Plus I’d rather have something thats keyword rich and

keyword,keyword,keyword would just look weird.

Try to do a domain search on, etc. for a domain with a comma in it (For instance, I tried www.Tampa, and they’ll tell you it is not proper syntax. Whether that’s right or wrong, it’s hard to use a domain if you can’t register it!

I’m not sure how that might translate into using them for folder names or file names. Never tried it, and I agree that it would look strange. But then again, all of this looked strange at some point! :wink:

a comma in a domain name is VERY different from a comma in a filename…

You can have commas in filenames, but you are very limited to the characters of a domain name

Thanks for the comments everybody. I’ll have to do some pondering

Sean :slight_smile:

I need to read it in deep but at a first glance here it said that the comma is a reserved character:

2.2. Reserved Characters

Many URI include components consisting of or delimited by, certain
special characters. These characters are called “reserved”, since
their usage within the URI component is limited to their reserved
purpose. If the data for a URI component would conflict with the
reserved purpose, then the conflicting data must be escaped before
forming the URI.

  reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
                "$" | ","

The “reserved” syntax class above refers to those characters that are
allowed within a URI, but which may not be allowed within a
particular component of the generic URI syntax; they are used as
delimiters of the components described in Section 3.

Characters in the “reserved” set are not reserved in all contexts.
The set of characters actually reserved within any given URI
component is defined by that component. In general, a character is
reserved if the semantics of the URI changes if the character is
replaced with its escaped US-ASCII encoding.

2.3. Unreserved Characters

Data characters that are allowed in a URI but do not have a reserved
purpose are called unreserved. These include upper and lower case
letters, decimal digits, and a limited set of punctuation marks and

  unreserved  = alphanum | mark

  mark        = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"

Unreserved characters can be escaped without changing the semantics
of the URI, but this should not be done unless the URI is being used
in a context that does not allow the unescaped character to appear.

The specification is not too much clear ( to me, no the spec itself ) on what’s that ``reserved purpose ‘’

But I’d not use the comma :slight_smile:

:slight_smile: andrea

It’s not very clear for me either Andrea!

Sean :slight_smile:

Using commas in a URL is not the most compliant way to build your site navigation. At the very least, I would use the URL escape character (%2C) for a comma in the file name.


It would make sense to use a comma if you need to have a list of variables in a URL, for example for generating a graph on the server.

I’m facing the same problem,
Any one let me know using comma’s in url are allowed are not. Do search engines read them?

I guess the confusion is due to using

URI Universal Resource Indentifier
URL Universal Resource Location

These are similar but NOT the same thing.

If you don’t know the difference you probably don’t need to worry about it much, but better yet, do a Search and read up a bit.

In a nutshell, If your link works it works.

This thread is very old, putting it to rest.