Characters that separate words in URL

What is the difference between separating words with a plus (“+”) versus a hyphen (“-”) versus an underscore (“_”) when creating “pretty URLs”?

Are all three valid?

What does Google think?

Debbie

Not exactly light reading but it is authoritative Uniform Resource Identifier (URI): Generic Syntax

My crude distillation - any character that isn’t “reserved” i.e. has “special meaning or use” is fine, else it needs to be url-encoded.

I can’t think of it’s use right now, but "+’ is listed as a sub-delimiter, so I guess that’s out as is.

Google? The topic has been discussed ad nauseum in the SEO forum, please Search using the vBulletin Advanced Search and SitePoint’s [URL=“http://search.sitepoint.com/”]Advanced Search

But what do you use and recommend??

Debbie

I prefer mostly letters, numbers sometimes, and if need be hyphens.

Even though both “work”, I think something like
domain.com/hyphens-or-spaces/
is better than
domain.com/hyphens%20or%20spaces/
don’t you?

This http://stackoverflow.com/questions/3867460/valid-url-separators says [a-z + -] are okay.

Google? The topic has been discussed ad nauseum in the SEO forum, please Search using the vBulletin Advanced Search and SitePoint’s [URL=“http://search.sitepoint.com/”]Advanced Search

And what would I search on?

Debbie

:d’oh: As soon as I logged out and took care of a few things my brain started working (a bit).

The + is reserved because it it used to represent a space.

So it’s a matter of which looks better / what would be easier to remember.

AFAIK Apache can deal with anything that meets the rfc3986 specs.

I searched for “dash” (I’m sure you could try “underscore” or “-” or “hyphen” and find others)

http://www.sitepoint.com/forums/search-engine-optimization-3/best-format-search-engine-optimization-503063.html?highlight=dash
http://www.sitepoint.com/forums/search-engine-optimization-3/semantics-better-url-_-616605.html?highlight=dash
http://www.sitepoint.com/forums/search-engine-optimization-3/rewrite-url-way-best-597227.html?highlight=dash
http://www.sitepoint.com/forums/search-engine-optimization-3/slashs-597529.html?highlight=dash
http://www.sitepoint.com/forums/search-engine-optimization-3/hyphens-directory-filenames-548718.html?highlight=dash
http://www.sitepoint.com/forums/search-engine-optimization-3/url-structure-does-sign-work-instead-dash-534670.html?highlight=dash
http://www.sitepoint.com/forums/search-engine-optimization-3/using-dash-page-name-not-492474.html?highlight=dash
http://www.sitepoint.com/forums/search-engine-optimization-3/good-search-engine-optimization-491834.html?highlight=dash
http://www.sitepoint.com/forums/search-engine-optimization-3/do-you-think-using-will-make-huge-difference-here-431406.html?highlight=dash
http://www.sitepoint.com/forums/search-engine-optimization-3/what-better-url-_-instead-spaces-367915.html?highlight=dash

Some of them are older, but things haven’t changed.

Folks,

The + is a reserved character for the query string’s replacement for spaces.

%20 in a URI is how a space is represented there.

In the case where I have a client (Welcome - Wilderness Wally’s Americana!) who wants to use the title of his article as the URI, I convert those spaces to _'s BECAUSE the more common -'s can also be found in the text of the title. Since there are no natural _'s in text, they can be inserted and restored with confidence. An additional benefit of _'s is that, visually, they let the words stand out just that little bit more. For domain names, however, _'s are frowned upon (reason unknown - unless it’s typing).

Sorry folks, I’ve had this explanation in my tutorial article for years (although your search list didn’t include the Article).

Mitt - SPOT ON with Sir Tim Bernews-Lee’s treatise on the URI Generic Syntax!

Regards

DK