views:

104

answers:

5

Do certain spiders/robots remove spaces from filenames and hence should spaces in filenames be avoided in websites?

+3  A: 

I think you should avoid spaces in website filenames in general and use some other methods like

ThisIsAnExample
This_is_an_example

You never know which software, script or server has to handle your filenames and if this will lead to errors. Additionally, people using your website might not like to handle URLs that contain something like

This%20is%20an%20example
schnaader
Spaces are also not recognised by some link-detect-scripts in blog/comment scripts, thus reducing the chance for the URL to show up as a link in user generated content.
Jacco
+3  A: 

I once learned that I should avoid mixing upper and lowercase as well as special chars (use only ASCII) and spaces. Since in the URL they may need to be escaped - hard to type manually (for testing) and likely to be overseen.

You might have as well problems with some weird bots not working correctly, but I'm not aware of one.

Sascha
+2  A: 

I don't know the exact behavior of robots, but I would imagine that most if not all should be able to handle spaces in website filenames.

That said, best practices recommend against using spaces in filenames on the web. This is less of an issue nowadays then a few years ago when browsers still differentiated between space and %20, but it can't hurt to follow this convention.

Ian Kemp
forget it, most robots are crap. They should be able to handle basic things like URLs.. but many fail.
Jacco
+3  A: 

I'm with schnaader on this - definitely avoid spaces, if possible. It'll help you avoid pesky URL-encoding issues such as this one.

That said, sometimes you'll need to use them anyway. Just realize you might have to do a little extra work to help out visitors with quirky browsers.

elo80ka
+1  A: 

And remember that for robots using "_" or "-" matters.

I.e. Google is treating dashes as word separator, so the url "archived-articles" will be seen as 2 words, while "archived_articles" will bee seen like 1.

Alekc
Hmm? You're saying "archived_articles" is the same as "archivedarticles"? Why use the underscore at all then?
Chris
This is no longer relevant; Underscores are now word separators, proclaims Google: http://news.cnet.com/8301-10784_3-9748779-7.html
Jacco