Crawl Rate - Migrations

How To: Convert And Redirect Uppercase URL Characters To Lowercase

uppercase and lowercase letters

TL;DR:
URL paths can be case-sensitive, meaning uppercase and lowercase versions of the same path can potentially exist as separate URLs. I recommend standardising URLs as lowercase, making sure your CMS and internal links generate the lowercase versions, and 301 redirecting any existing uppercase URLs to their lowercase equivalent. This guide covers ways to do that with Apache .htaccess, WordPress, NGINX and IIS.

Why I recommend using lowercase URLs

When carrying out an SEO & Website audit, one URL issue I occasionally come across is the same page being accessible using both uppercase and lowercase characters.

For example:

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/

may look like minor variations, but URL paths can be case-sensitive, depending on the server and configuration.

From an SEO perspective, my preference is simple: keep URLs lowercase and make sure there’s only one consistent version of each URL available.

If both uppercase and lowercase versions resolve separately, you can end up with multiple URLs representing the same content. You may also have internal links, external links or search engines discovering different versions of what should really be one URL.

Wherever possible, I’d fix the source of the problem so your CMS and internal links only generate lowercase URLs.

If uppercase URLs are already being requested or discovered, you can also 301 redirect them to their lowercase equivalent.

I’ve covered redirects in more detail in my rough guide to 30x redirects, but below are a few ways you can handle uppercase URLs depending on your server or CMS.

Should URLs use uppercase or lowercase letters?

As a general rule, I recommend using lowercase letters in URLs.

URLs can be case-sensitive, particularly within the path. That means /My-Page/ and /my-page/ can potentially be treated as different URLs rather than simply different ways of writing the same address.

From an SEO perspective, consistency is the important part. If uppercase and lowercase versions of the same page are both accessible, search engines may discover multiple URL variations for the same content, while internal and external links can also end up pointing at different versions.

Using lowercase URLs throughout the site makes this much easier to control and gives you a consistent URL structure.

Are URLs case-sensitive?

They can be. The domain name itself isn’t case-sensitive, but the path that comes after the domain can be, depending on the web server and configuration.

So rather than relying on how a particular server handles uppercase characters, I prefer to standardise URLs as lowercase and redirect any uppercase variations to the lowercase version.

Redirect uppercase URLs to lowercase using .htaccess

If your site runs on Apache and you can edit the .htaccess file, you can use a rewrite rule to detect uppercase characters in the URL path, convert them to lowercase and then issue a 301 redirect to the lowercase URL.

One approach is:

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]

The important part here is that this results in a 301 redirect, rather than simply allowing both uppercase and lowercase versions of the URL to remain accessible.

Before applying a sitewide rewrite like this, test it carefully on a staging environment or a small number of URLs first. Rewrite rules can interact with existing redirects and CMS routing, so you want to make sure you’re not creating redirect loops or affecting URLs that shouldn’t be changed.


Redirect uppercase URLs to lowercase in WordPress

If you’re using WordPress and don’t want to edit .htaccess or your server configuration directly, there are plugins designed specifically to 301 redirect uppercase URLs to their lowercase equivalent.

Two options are:

Both are still listed in the WordPress plugin directory and are designed to redirect uppercase URLs to lowercase versions. However, both plugins are quite old and haven’t been tested against recent WordPress versions, so I’d check compatibility on your site before relying on either in production.

If you have access to the server configuration, I’d generally prefer handling a sitewide URL-normalisation rule there rather than adding another WordPress plugin purely for this job.

Redirect uppercase URLs to lowercase with NGINX

If your website runs on NGINX, converting an arbitrary URL path from uppercase to lowercase is less straightforward than applying a simple rewrite rule.

NGINX’s standard rewrite module can match uppercase characters and redirect URLs, but it doesn’t provide a built-in function that simply converts the entire matched URL to lowercase.

Because of that, I wouldn’t recommend copying a generic rewrite rule without considering your particular NGINX setup.

Where possible, the better approach is to make sure your application or CMS generates lowercase URLs in the first place, then create appropriate 301 redirects for any known uppercase URLs that already exist.

If uppercase URLs are being generated sitewide, I’d treat that as a server/application configuration issue and have the lowercase redirect implemented and tested specifically for that environment.

Redirect uppercase URLs to lowercase with IIS

If your site runs on Microsoft IIS and has the URL Rewrite module installed, IIS includes a built-in ToLower function that can be used when creating a redirect.

For example, a rule can take the requested URL path, convert it to lowercase and return a permanent redirect to the lowercase version.

Microsoft documents the syntax as:

{ToLower:{R:1}}

When configuring the rule, make sure the action is a Redirect rather than an internal rewrite, and use a 301 Permanent response for URLs that should permanently resolve to their lowercase equivalent.

As with any sitewide redirect rule, test it carefully before deploying it across the entire site to make sure it doesn’t conflict with existing redirects or application routing.

Should you redirect all uppercase URLs to lowercase?

If uppercase and lowercase versions of the same page are accessible, then yes, I’d generally standardise on the lowercase URL and 301 redirect the uppercase version.

But the redirect is only part of the fix.

You should also find out why uppercase URLs are being created or discovered in the first place. Check your CMS, templates, navigation, XML sitemap and internal links to make sure they’re consistently generating and linking to the lowercase versions.

Otherwise, you can end up relying on redirects to correct a problem the website is continuing to create.

My preferred setup is simple:

  • generate lowercase URLs
  • link internally to lowercase URLs
  • include lowercase URLs in your sitemap
  • redirect any existing uppercase variations to their lowercase equivalent.

If you’ve discovered URL variations like this while investigating crawling or indexing problems, my SEO & Website Audits cover the wider technical issues that can cause search engines to discover unnecessary or duplicate URLs.




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, search engines and AI platforms.

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