why use - instead off _ in url? Url contain '_' seems like no bad effects.
Google recommends using hyphens instead of underscores in your URLs. This is because using hyphens instead of underscores makes it easier for Google's web crawler to compute the information that your website has and create consistent results.
If you use dash or underscore, remember that a dash is read by Google as a hyphen, so does not alter how your URL is categorized. An underscore is counted as a character, and can mess up your SEO.
Google views hyphens in URLs as word separators while an underscore in your url will not be recognized. This means using hyphens makes it much easier for Google to figure out what a page is about. For example, a URL containing the phrase "my_page" would be interpreted as "mypage" instead of "my page".
It is legal, however, to have an underscore in the URI 'path' that follows the domain name part of a URL.
Underscores are not allowed in a host name. Thus some_place.com is not a valid URL because the host name is not valid. Underscores are permissible in URLS. Thus some-place.com/which_place/ is perfectly legitimate, other concerns aside.
From RFC 1738:
host
[...] Fully qualified domain names take the form as described in Section 3.5 of RFC 1034 [13] and Section 2.1 of RFC 1123 [5]: a sequence of domain labels separated by ".", each domain label starting and ending with an alphanumerical character and possibly also containing "-" characters. The rightmost domain label will never start with a digit, though, which syntactically distinguishes all domain names from the IP addresses.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With