SEO: Dash vs Underscore in URLs

Are you wondering whether you should use a dash versus an underscore in URLs? This article will provide a definitive answer.

Well, I recently recommended to a friend that he change his web site URLs from 'keyword1_keyword2' (underscore) to 'keyword1-keyword2' (dash).


Because according to Matt Cutts - a senior software engineer at Google - he recommends using dashes for Google.

According to his article, "Dashes vs. underscores", 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 Googlebot 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.

301 Redirect

For example:

Redirect 301 /old_directory

Redirect 301 /old_page.html

Redirect 301 /old_directory/old_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 winner.

About the author: Michael Wong is the editor of and author of, which shows people how to make money online. Mike entered the internet industry in 1998. He sold a website to a SoftBank funded start-up in 2000. He wrote one of the earliest SEO books in 2002. And he's generated millions in online revenue since then.
You have Mike's permission to republish this article in your website, on the condition you include Mike's bio after the article.