# Naming convention and search engines

**URL:** <https://www.ruby-forum.com/t/naming-convention-and-search-engines/104455>\
**Category:** Rails\
**Created:** [May 18, 2007, 6:06am UTC](https://www.ruby-forum.com/t/naming-convention-and-search-engines/104455 "2007-05-18T06:06:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rails.impaired](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d9b06d/32.png) [@rails.impaired](https://www.ruby-forum.com/u/rails.impaired)\
**Post date:** [May 18, 2007, 6:06am UTC](https://www.ruby-forum.com/t/naming-convention-and-search-engines/104455/1 "2007-05-18T06:06:12Z")

</div>

Hi all:

The following is an Search Engine Optimization tip that is fairly  
common in most of the SEO checklists that I have read.

Hyphens - Use hyphens ( - ) and not underscores ( \_ ) to separate  
words in directory and file names. Most search engines parse a hyphen  
like a reader would parse a space. Using underscores makes  
what\_would\_you\_do look like whatwouldyoudo to most search engines. You  
should definitely separate words in your URLs.

Let’s say I create a small test app.

# rails test

create a controller, edit the controller, create a template, and run  
the server

# script/generate controller WebResources

# do the manual editing stuff here.

# script/server webrick

To access the page: [http://localhost:3000/web\_resources/index](http://localhost:3000/web_resources/index)

Works fine. I’m wondering if there is a way to reference the above  
URL using hyphens to make the spiders happy??  
[http://localhost:3000/web-resources/index](http://localhost:3000/web-resources/index)

Any thoughts??

Thanks
