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. Search engines like Google treat hyphens as space separators, making it easier for them to parse and understand the individual words in a URL. For example, a URL like example.com/seo-friendly-url/ is more readable and meaningful to both users and search engines than example.com/not_seo_friendly_url/, where underscores are not interpreted as word separators. 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 and/or improving your SEO.