URL Normalizer (force lowercase and trailing slash)
WordPress plugin that enforces lowercase URLs and trailing slashes via 301 redirects.
by Eugene Bevziuk · github.com/bvzk/wp-url-normalizer · website
★ 7stars
1forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/bvzk/wp-url-normalizer/archive/refs/heads/main.zipFrom the readme
wp-url-normalizer
A lightweight WordPress plugin that enforces lowercase URLs and trailing slashes via 301 redirects. Zero dependencies, no settings page — just drop it in and it works.
What it does
- Lowercases all URL paths (/About-Us/ → /about-us/)
- Enforces trailing slashes (/about-us → /about-us/)
- Collapses double slashes (/about//us/ → /about/us/)
- 301-redirects anything that doesn't match canonical format
- Preserves query strings (?utmsource=... passes through untouched)
What it skips
- Non-GET requests (POST, PUT, DELETE — untouched)
- WordPress admin (/wp-admin/)
- REST API (/wp-json/)
- AJAX, CRON, XMLRPC, CLI
- Static files (.jpg, .css, .js, .png, etc.)
- /wp-content/ and /wp-includes/
Installation
1. Download url-normalizer.php
2. Upload to /wp-content/plugins/ or /wp-content/mu-plugins/
3. Activate in Plugins → Installed Plugins (not needed for mu-plugins)
No configuration needed.
Extending via filters
Disable path lowercasing (e.g. for OAuth callbacks or case-sensitive slugs):
Add custom skip prefixes:
Why this exists
WordPress doesn't normalise URLs by default. The same page is accessible at:
Google treats these as separate URLs, splits your backli
Read the full README on GitHub →