SEO Information
Hyphens in URLS from Growth Optimization

Should I use underscores or hyphens in urls?

Google looks at hyphens in URLs as word separators while an underscore in your url will not be recognized. This means using hyphens makes it a lot easier for Google to figure out what a page is referencing to. Here is an example, a URL containing the phrase “reverse_enginner” would be interpreted as “reverseengineer” instead of “reverse engineer”.

Google offers an in detail explanation regarding optimized URL structure and the use of underscores in urls in the Google Search Console Help guidelines called “Keep a simple URL structure“.

Matt Cutts explains the reason why Google do this in the Webmaster help video below.

Note: Whilst this video is old, it is still relevant in 2020.

Underscores in URLs aren’t recognized by Google, a URL containing “reverse_engineer” will look like “reverseengineer”. A URL containing “reverse-engineer” will be interpreted as “reverse engineer”. Why does this matter? It matters because “reverse engineer” is easier for Google to interpret, making it appear more relevant to queries about the “reverse engineer” topic (“how to reverse enginer”, “what is reverse engineer”, and so on).

The easier it is for Google to read and interpret / understand the URL, the easier it is to determine its relevance for a search query.

Here is an example:- Say you are looking to create a page for what is reverse engineering. You can choose between two URL structures: what_is_reverse_engineering or what-is-reverse-engineering. If you select the first option, Google will only see “whatisreverseenigineering”, which will be harder for google and other search engines to understand.

Option two, “what-is-reverse-engineering” will look like a normal sentence, and in turn will be relevant to a broad variety of searches:

As an added bonus for URLs using hyphens, any links using the URL as anchor text will also be interpreted as including keywords in the anchor text. They are also easier for users to read, as underscores can easily be mistaken for spaces, leading people to type in the wrong URL when trying to visit your site. Using hyphens in urls is the way forward.

Punctuation is not a ranking signal, it is only used to read and interpret a URL when indexing. If you are currently using underscores in your URLs and you are getting the ranking results you require then there is no need to change them.

If you were to jump and change to hyphens in your URLs then you could see a short term ranking loss as Google will need to reindex and interpret the new URL structure when it recrawls your website and associated pages.

You can check out this Webmaster Hangout where John Mueller where he advises against redirecting URLs just to resolve your underscore vs hyphen issues

Check out this example and Wikipedia. Wikipedia is a perfect example of a domain that uses underscores in all of its URLs, but consistently dominates SERPs for informational searches and then some. Here is the example: below you will see an image of a SERP on a search for London Buildings. You will see the first result is Wikipedia. Look at all the underscores in its URL!

Now check out the SERP:

Hyphens in URLs

Wikipedia’s on-page optimization, off-page signals and overall domain authority are so strong that underscores in its URLs do not have much of an impact on its page rankings. If you are using underscores in your URLs and not seeing results that you would like then use 301 redirects to move to a URL structure using hyphens.

If your page “example.com/reverse_engineer” isn’t ranking very well, change your URL structure to use hyphens, and then publish the page at “example.com/reverse-engineer. Set up a 301 redirect to send all humans and crawlers to the new URL. Just remember, the url structure may not be the only reason why your page is not ranking that well so don’t jump to conclusions to soon. Ensure you do a full analysis of the whole page, the keyword or phrase you want to rank for and what your competitors are up to. You may well find you that it could be something you haven’t considered.