Crawl Rate - Migrations

How To: Convert And Redirect Uppercase URL Characters To Lowercase

uppercase and lowercase letters

When carrying out an SEO & Website audit, one of the fundamental aims is to avoid duplicate URLs being crawled, and a common issue that I’ve come across over the years is a CMS (or user) that has inadvertently created two versions of the same URL with both upper and lower case characters.

For example, the following URLs lead to the same content but would be treated as two separate URLs:

https://daveashworth.co/blog/How-To-Convert-And-Redirect-Uppercase-URL-Characters-To-Lowercase

and

https://daveashworth.co/blog/how-to-convert-and-redirect-uppercase-url-characters-to-lowercase

A URL that is duplicated due to upper and lower case variations is an issue because search engines treat URLs with different cases as separate URLs, even if they lead to the same content. This can cause search engines to index multiple versions of the same page, which can dilute your website’s search engine rankings.

Additionally, if external sites link to different versions of your URL with different cases, it can cause link equity to be split between the different versions, further diluting your website’s authority and ranking potential. Therefore, it’s important to establish a consistent URL structure, preferably using lowercase letters to avoid any potential duplicate content issues.

Best practice would be to avoid any upper case characters and create and serve all links in lower case only.

For some sites, it might be easy to go ahead and convert any URLs and internal links to all lower case, but if this is a CMS or site wide issue, the preferred solution would be to set up redirects rules that 301 redirect any URLs containing upper case characters to their lower case equivalent.

Here is how you do it:

Redirect Uppercase URL Characters To Lowercase using HTACCESS

RewriteEngine On
RewriteRule [A-Z] - [E=HASCAPS:TRUE,S=1]
RewriteRule ![A-Z] - [S=28]
RewriteRule ^([^A]*)A(.*)$ $1a$2
RewriteRule ^([^B]*)B(.*)$ $1b$2
RewriteRule ^([^C]*)C(.*)$ $1c$2
RewriteRule ^([^D]*)D(.*)$ $1d$2
RewriteRule ^([^E]*)E(.*)$ $1e$2
RewriteRule ^([^F]*)F(.*)$ $1f$2
RewriteRule ^([^G]*)G(.*)$ $1g$2
RewriteRule ^([^H]*)H(.*)$ $1h$2
RewriteRule ^([^I]*)I(.*)$ $1i$2
RewriteRule ^([^J]*)J(.*)$ $1j$2
RewriteRule ^([^K]*)K(.*)$ $1k$2
RewriteRule ^([^L]*)L(.*)$ $1l$2
RewriteRule ^([^M]*)M(.*)$ $1m$2
RewriteRule ^([^N]*)N(.*)$ $1n$2
RewriteRule ^([^O]*)O(.*)$ $1o$2
RewriteRule ^([^P]*)P(.*)$ $1p$2
RewriteRule ^([^Q]*)Q(.*)$ $1q$2
RewriteRule ^([^R]*)R(.*)$ $1r$2
RewriteRule ^([^S]*)S(.*)$ $1s$2
RewriteRule ^([^T]*)T(.*)$ $1t$2
RewriteRule ^([^U]*)U(.*)$ $1u$2
RewriteRule ^([^V]*)V(.*)$ $1v$2
RewriteRule ^([^W]*)W(.*)$ $1w$2
RewriteRule ^([^X]*)X(.*)$ $1x$2
RewriteRule ^([^Y]*)Y(.*)$ $1y$2
RewriteRule ^([^Z]*)Z(.*)$ $1z$2
RewriteRule [A-Z] - [N]
RewriteCond %{ENV:HASCAPS} TRUE
RewriteRule ^/?(.*) /$1 [R=301,L]

Alternatively, you can try this:

RewriteEngine On
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule ^/?(.*)$ /${lowercase:$1} [R=301,L]

Redirect Uppercase URL Characters To Lowercase using WordPress Plugin

If you don’t have access to the htaccess file via WordPress, then you can use a plugin such as:

WP Force Lowercase URLs

LH Force Lowercase URLs

Redirect Uppercase URL Characters To Lowercase with NGINX

location / {
  rewrite ^/?(.*)$ /${lowercase:$1} [R=301,L]
}

Redirect Uppercase URL Characters To Lowercase with IIS

  1. Open the IIS Manager.
  2. In the left pane, expand the website or application that you want to configure.
  3. In the right pane, double-click on the Url Rewrite Module.
  4. In the Url Rewrite Module dialog box, click on the Rules tab.
  5. Click on the Add Rule button.
  6. In the Add Rule dialog box, select the “Redirect” rule type.
  7. In the URL to Redirect to field, enter the following:

    ${lowercase:{R:0}}
  8. In the Response Type field, select the “Permanent” response type.
  9. Click on the OK button.

About The Author

I’m Dave Ashworth — a freelance SEO and website optimisation consultant with a background in development and a focus on fixing what’s broken, improving what’s working, and helping businesses grow through clear, practical SEO.

I combine hands-on technical know-how with years of experience in analytics, content strategy and platform optimisation. Whether it’s an audit, a migration, or ongoing performance support, my work’s about making websites stronger, faster, and easier to understand — for users and for search engines.

When I’m not writing guides or sharing insights, I’m working directly with clients to solve problems, track results, and keep their sites moving in the right direction.

Dave Ashworth

get in touch

If you need some expert website optimisation and configuration, want to find out more, or even just have a question, fill in the form below as I will always be happy to help