Baron Munchausen’s Crawl Test Lab

Underscores in URLs: Example and SEO Effects

I crossed the Thames on a plank_and_a_half, and no Englishman could say where one word stopped and the next began.

The short answer

What it is
An underscore in a URL path is the _ character used to join words, as in /blue_widgets/. Hyphens are the recommended word separator for web addresses.
Why it matters
Google has advised that hyphens separate words better than underscores, which may be read as joining them. The effect is small, but it costs nothing to get right on new pages.
How a crawler should report it
Report a URL format warning with the cause set to underscore in path, and treat it as low priority. Do not flag underscores that appear only in the query string.
Live examples
A long line of ducks strung together on one cord, like pearls on a necklace.
Fig. 60. Ducks_joined_by_a_line, and nobody can tell them apart.

Hyphens, Underscores, and How Words Get Split

Underscores in URLs are valid, and any server or browser can handle them. The question is how search engines read the words. Google's URL guidance recommends hyphens over underscores. A hyphen is a clear word break, so blue-widgets reads as two words. An underscore has often been treated as a joiner, so blue_widgets may read as one long token. Programmers use underscores in names on purpose, which is one reason for the old rule.

They usually come from code and files. A developer names a route after a function, such as /user_profile/. An old CMS builds paths from database fields. Someone uploads spring_sale_final.pdf and the name goes live as it stands. Mixed patterns are common on older sites, where some sections use hyphens and others use underscores. That mix is untidy, but it does no direct harm.

Browsers do nothing special with an underscore. One real pain point is visual. When a link is underlined, the underscore can vanish into the line, so readers may copy it wrong. For search, URL words are a small signal next to the page's title, headings, and text. A page with underscores can still rank well. So this is a defect worth avoiding, not an emergency.

To detect the issue, search the paths in your crawl for an underscore. Ignore query parameters, since those names follow other rules. To fix new content, set your CMS to use hyphens in every slug. For old URLs, weigh the cost. A site-wide change just to swap underscores is rarely worth the risk. If you are already moving those pages for another reason, then change them. Use one-to-one 301 redirects, update internal links, and update your sitemap in the same release.