Home → Technical SEO → Fix guides → URL lowercase, hyphens, short, no special chars

tech

How to fix: URL lowercase, hyphens, short, no special chars

Part of the Technical SEO pillar on the Site Integrity Index.

Why this matters

Clean URLs are easier for crawlers to process, easier for users to share, and a minor ranking signal. Lowercase, hyphens (not underscores), under 100 chars, no special characters or session-ID-style parameters. Legacy variants should 301 to the canonical version.

Background

Clean URLs are easier for crawlers, easier to share, and a minor ranking signal. Lowercase, hyphens (not underscores), under 100 chars, no special characters or session IDs.

References

Google Search Central · URL structure best practices

How to fix

Code snippet for each stack we cover. Pick the one matching your server / framework.

nginx
Use rewrite rules to lowercase + hyphenate legacy URLs and 301 to the canonical version.
apache
Use mod_rewrite + RewriteMap (lowercase) or RewriteRule for individual fixes.
cloudflare
Transform Rules → Rewrite URL → URL normalisation (lowercase, strip params).
wordpress
Settings → Permalinks → use a clean structure ('Post name'). 301 legacy URLs via Redirection plugin.
flask
Use Flask-RESTful-style URL conventions. Validate/normalise paths at the URL layer.
express
Use a URL normalisation middleware (e.g. lowercase + strip trailing slash).
rails
Use friendly_id gem; lowercase all routes.

Verify it's working

View your homepage URL. All-lowercase? Hyphens not underscores? <100 chars? No unnecessary query params?

Want to know if your site has this issue?

Run a free audit — security, GDPR, technical SEO, AEO/GEO, and WCAG accessibility.

Audit my site →