Why Underscores in URL are Not Recommended

Underscores were used in URLs in the past because some computer systems did not recognize hyphens as word separators. However, modern search engines and web servers can easily handle hyphens in URLs. In fact, search engines actually treat hyphens as word separators, making it easier to read and understand URLs.

On the other hand, underscores can cause some issues, especially when it comes to search engine optimization (SEO). Search engines treat underscores as a character, which means that URLs with underscores are treated as a single word. This can make it difficult for search engines to understand the structure of the URL and the words that it contains. As a result, URLs with underscores can hurt SEO efforts by making it more difficult for search engines to understand and categorize the content on a website.

In addition, underscores can also cause issues with readability and user experience. URLs with underscores can be more difficult to read and understand than those with hyphens, especially when they contain multiple words. This can make it harder for users to remember and share URLs, which can impact the overall visibility and success of a website.

Overall, while underscores can be used in URLs, it is generally recommended to use hyphens instead. Hyphens are more SEO-friendly, easier to read and understand, and can help to improve the overall user experience.