DIY SEO: URLs - Hyphens vs Underscores

There's been some debate in the SEO community about using hyphens (-) to separate words instead of using underscores (_) in the URL Structure. This is also an important concept for naming other files, such as images and PDFs, or even the domain itself (e.g.: www.my-website.com). This debate tends to creep up again and again every few years - though the question itself is brought up much more often than that by folks just starting to learn SEO.

Example 1: www.website.com/my-awesome-page (hyphens)

Example 2: www.website.com/my_awesome_page (underscores)

A while back, it seemed as though all the expert SEO's understood that underscores are not read by search engines as spaces between words. In other words, "page_about_spaghetti" would be read as "pageaboutspaghetti". Hyphens are the only way to make absolutely sure that phrases would be read correctly. For example, "page-about-spaghetti" would be read by the search engines as "page about spaghetti". This is what we want. We want our phrases to be read correctly so that they can be searched for correctly by anyone using search engines to potentially find our website content.

Google's own webmaster guidelines used to spell this out more clearly. Now, it simply states, "We recommend that you use hyphens (-) instead of underscores (_) in your URLs." While we're not 100% sure that Google still does not read underscores as spaces or word separators, the quote above is enough for the likes of me. Google doesn't say much, but when they do say something, they mean it.

My own experience has told me that nowadays keywords are lifted out of sentences and URL structures just fine... most of the time. When words strung together make other words, such as "website.com/therapist" vs "website.com/the-rapist", problems can arise. While this example is a bit over the top, you begin to see the point I'm trying to make.

Bottom line: it should be considered a good and worthwhile practice to separate all words in your URL and file structures with hyphens. It makes Google's job easier, taking less time and bandwidth to index your site. It will also make your site more search-friendly for users who could be looking for your content via search engines.

URL Examples:

Good: website.com/i-like-many-cheeses

Bad: website.com/ilikemanycheeses

Bad: website.com/i_like_many_cheeses


Image Examples:

Good: pretty-red-flowers.jpg

Bad: prettyredflowers.jpg
 

Let me know if you have any questions or comments about this topic!
 

Share |

No comments (Add your own)

Add a New Comment

Enter the code you see below:
code
 

Comment Guidelines: No HTML is allowed. Off-topic or inappropriate comments will be edited or deleted. Thanks.