Your probably wondering whether you should use a dash versus an underscore in URLs? I recently helped a client change his web site URLs from ‘keyword1_keyword2’ to ‘keyword1-keyword2’.
Why did we do this?
Because according to Google – they recommend using dashes. If you have a URL like ‘keyword1_keyword2’ Google will only return that page if the user searches for ‘keyword1_keyword2’ (which almost never happens). If you have a URL like ‘keyword1-keyword2’, that page can be returned for the searches for ‘keyword1’, ‘keyword2’, and even ‘keyword1 keyword2’.
Don’t forget to inform the Search Engine bots and other search engine crawlers that a page has moved to a permanent location by adding 301 redirects to your web site’s ‘.htaccess’ file.
Redirect 301 /old_directory http://www.example.com/new-directory
Redirect 301 /old_page.html http://www.example.com/new-page.html
Redirect 301 /old_directory/old_page.html http://www.example.com/new-directory/new-page.html
Note that the first URL only includes the directories (if any) and file name. The second URL must include the domain, in addition to the directory (if any) and file name. This is because the redirect may point to a file on another domain – it doesn’t have to be on the same domain.
A Word of Warning
Be very careful with entries in the .htaccess file. It is very sensitive. The entries must be exact, otherwise it will crash your web site. So before making any changes to the .htaccess file, make a copy of the file you’re editing. Make 1-2 changes at a time, and make sure there are no typos in your entries.
So there you have it. In dash vs underscore in URLs, dash is the clear choice when creating your URLs.