On-page - Do you use dashes in your URLs?

Updated by Seth Daily [SSW] 7 months ago. See history

123
<introEmbed body={<> For maximum readability and SEO use kebab-case (dashes) in your URLs and [make them short and friendly](/create-friendly-short-urls). Learn more on [Best Practices for URL Structure](https://www.searchenginejournal.com/technical-seo/url-structure/#bestprac). </>} />

northwind.com/pageonworddocumentation

❌ Figure: Bad example - No kebab-case in URL

northwind.com/PageOnWordDocumentation

❌ Figure: Bad example - PascalCase (better readability and still works in small caps, but other people might share it without the MixedCase)

northwind.com/page on word documentation

...will become

northwind.com/page20%on20%word20%documentation

❌ Figure: Bad example - spaces it will show up in your URL structure as 20%, which is bad for readability and SEO

northwind.com/page_on_word_documentation

😐 Figure: OK example - underscored (snake_case) URLs have good readability but are not recommended by Google

northwind.com/page-on-word-documentation

✅ Figure: Good example - kebab-case is recommended by Google. Note: Don't use any uppercase

Not for domains! This is only for pages and documents. Domains are bad when they have dashes in them.

Read more on SEO 101: Hyphens vs. Underscores in URLs.


More info: You can install the IIS URL Rewrite Module for IIS7 you can make ugly URLs much more friendly.

<imageEmbed alt="Image" size="large" showBorder={false} figureEmbed={{ preset: "default", figure: 'Rewrite both the HTML in the page and the incoming URL\'s to be friendly', shouldDisplay: true }} src="/uploads/rules/use-dashes-in-urls/friendly-url-rule.jpg" />

The caveat here is that it will only work if the URL is in the clear on the page.

Note: This could only be done with certain links as others are postbacks as well.

Acknowledgements

Adam Cogan
Tiago Araujo
Related rules

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.

We open source.Loving SSW Rules? Star us on GitHub. Star