Underscores or hyphens in URLs?

When creating a website and/or adding new folders/webpages—should you use a hyphen or underscore between words when defining a URL?

This is another one of those long-debated questions when creating a website:

My-answer-has-always-been: Hyphen

Why use a hyphen vs. underscore in a URL?

Search engines interpret hyphens better than underscores. This is important for SEO.

Google: “We recommend that you use hyphens (-) instead of underscores (_) in your URLs”

Note that underscores should not be used in image names either. I highly recommend you use hyphens instead of underscores when naming your images.

Feel free to contact Ron the Web Guy if you need help or guidance on creating a website.

Scroll to Top