Inflow - Attract Convert Grow

Inflow: eCommerce Marketing Agency

  • Services
    • SEO
    • PPC
    • CRO
    • Paid Social
  • Clients
    • Case Studies
  • About Us
    • Contact Us
  • Insights Blog
  • Request Proposal
  • Services
    • SEO
    • PPC
    • CRO
    • Paid Social
  • Clients
    • Case Studies
  • About Us
    • Contact Us
  • Insights Blog
  • Request Proposal

Home > eCommerce Digital Marketing Blog > SEO > Technical SEO > Are URLs Case-Sensitive? How to Redirect Uppercase URLs to Lowercase URLs Using Htaccess or httpd.conf

Are URLs Case-Sensitive? How to Redirect Uppercase URLs to Lowercase URLs Using Htaccess or httpd.conf

Posted By Alex Juel on December 9, 2020

  • 10shares

google search for how to redirect uppercase urls

Editor’s Note: This post was originally published on May 15, 2013, and has been updated for completeness and accuracy.

It may surprise you but, yes, URLs are case sensitive. And, if you have both upper- and lowercase versions of your site’s domain, you may be unintentionally making Google’s job harder — and hurting your site’s own performance.

If a page on your site can be accessed with both uppercase and lowercase letters, Google will treat every variation as a separate version. And that’s because, technically, those URLs could be unique versions. On Apache servers, you have the ability to show completely different content on URLs that have the same page name when the page name has different cases (for example: /case-sensitivity vs. /Case-Sensitivity).

Google, like any other computer system, will read a line of text and treat uppercase and lowercase letters differently!

Having a mix of uppercase and lowercase URLs on your website isn’t always a problem, as long as the search engines aren’t able to find both versions. But making that happen does require some precautions; otherwise, it can cause some major headaches down the road.

Here are a few reasons why you need to consider case sensitivity on your website.

  • Case sensitivity can result in 404 errors.
  • Search engines consider uppercase and lowercase URLs to be different pages.
  • Search engines will consider variations of the same page to be duplicate content (learn more about that here).
  • Google might index the version of the URL you don’t want to be indexed.
  • Pages will show up as duplicates in analytics.

How Different Servers Handle Case Sensitivity

Windows servers are normally case insensitive, so upper- and lowercase URLs typically won’t be a problem there. However, there are some drawbacks to these servers. For one, Windows servers typically cost more than Linux servers. They also don’t have as much freedom as Linux servers do, so most people choose to host their websites on Linux.

Linux servers are case sensitive, and this is where you normally run into issues (more on that below).

Some popular eCommerce platforms (such as Volusion and Shopify) default to allowing both uppercase and lowercase URLs to be accessible, so you’ll need to take extra steps to make sure only one version is accessible and/or linked to throughout the site. While not common, we sometimes see businesses purposely linking to uppercase versions of pages of their site in the main navigation, footers, or other places of the site, even when lowercase is the default.

Why Case-Sensitive URLs Matter

Case Sensitivity Can Cause 404 Errors

If you create a page on a Linux server with capital letters and someone tries to visit that page with lowercase letters, the user will reach a 404 error page (unless redirects are in place).

This can happen as a link gets passed along through emails, newsletters, social media, and blog mentions. Somewhere along the line, someone might decide that they don’t like the look of the uppercase letters and change them to lowercase without testing the URL. We see this all the time while reviewing backlink data for our clients or their competitors.

This can also happen when a site goes through a redesign and a developer decides to change all pages from uppercase to lowercase. All of those old URLs could become inaccessible, and all of the links on the internet going to those pages will break.

Many CMSs like WordPress and Drupal will automatically fix case-sensitivity problems with redirects, so it might not be a problem with your platform, but always check to make sure!

Google Gets Confused

Google sees non-www and www versions of a website as two different URLs — and it’s the same for uppercase and lowercase versions of the same page. This can spread page authority and link equity among two pages when, instead, you should be sending it all to one page and giving it the ability to rank as highly as possible. 

You can often verify this in Google Analytics (GA) and Google Search Console (GSC). If GA shows multiple versions of the same page getting traffic, it’s likely that those pages are showing up in the search results, possibly with different rankings. And in GSC, you can check to see what keywords each version is ranking for and how well they rank for those keywords. 

Below is a real example. I can’t share the full URL, so you’ll just have to trust me that it’s the same page.

Google Analytics results for uppercase and lowercase versions of same page, showing difference in number of impressions

It’s likely that you’ll find one version ranking better for certain keywords than the other. Both pages are canonical to the lowercase version, and the site has only linked to the lowercase version for several years, yet Google ignores the canonicals.

This is one example of why I believe that canonicals are a good signal, but they’re not reliable. I always recommend 301 redirects in this case.

It May Even Index the Wrong Page!

Even short-lived uppercase URLs can have long-lasting effects if Google indexes those pages.

One of our clients made the mistake of linking to uppercase and lowercase URLs throughout their site and sitemap years ago. To this day, Google continues to index their uppercase URLs, even after years of specifying lowercase canonicals and updating the XML sitemap.

Redirects can fix these issues most of the time (more on that below), but because our client’s platform doesn’t allow for those, Google continues to index a mix of upper- and lowercase pages across the site.

Analytics Data Issues

I’m not sure how it works with other analytics programs, but in Google Analytics, uppercase and lowercase versions of the same page show up separately, each with their own data.

Here’s an example of the same page mentioned above:

Google Analytics results for uppercase and lowercase versions of same page, showing difference in number of users and sessions

If you don’t think to look at data for all versions of the same page, you’re not getting an accurate representation of how that page is performing.

By the way, if you do have this issue in GA, you should create a new GA view that filters all data to either uppercase or lowercase (whichever version you want to use). Here’s a great walkthrough showing how to set that up.

At Inflow, we always leave a “raw” unedited view in our client’s GA accounts, and then we create a new clean view with filters like this.

Why Do People Create Uppercase URLs Anyway?

Screaming girl with text: "Oh noes!!! I got caps all up in my URLs! What do I do?!?"
*Image courtesy of CortneeB

Now that you know why capital letters do matter in URLs, using them may seem clearly counterintuitive.

But there are actually several good reasons why someone might want to capitalize page URLs.

  • Readability (such as for pay-per-click, print, or television ads)
  • Branding purposes
  • Visual preference

Readability and branding are the most common reasons that people display their URLs with capital letters. We used to see it all the time in pay-per-click ads, but the search engines automatically convert URLs to lowercase in ads now. Branding is another big reason for capitalizing letters in URLs, especially when handing out print materials that have special landing pages or on social media.

For any of the above reasons, someone might visit your website by typing the URL with capitalization, or they might type it in lowercase, even if you’ve displayed it capitalized. People might link to your site both ways too, so you either need to make sure both uppercase and lowercase versions are accessible or that only one version is accessible and the other redirects.

How to Redirect Uppercase URLs to Lowercase

If you only have a few pages with capitalized URLs, you can simply set up some easy 301 redirects. If you have a ton of pages that need to be redirected though, you’ll probably find it much easier to implement a site-wide fix.

Option 1: Enforcing Lowercase URIs with Rewriting

The preferred method is to use server config files in your HTML code. If you have access to your httpd.conf file, try this method. It’s clean and works well. If you don’t have access to your httpd.conf files, your hosting company might be willing to turn the feature on for you.

Option 2: htaccess Redirect to Lowercase

An alternative method is using the htaccess file. Depending on the Apache version your server is running and any other rules already running in your htaccess file, this method can be buggy. On some servers, this can break images or cause the site to suffer from decreased speed. We’ve even received several comments from people who have tried the htaccess method and have caused their entire site to show a 500 status error. We’ve tested it on a few small sites and we didn’t have any issues, but you need to be very careful with this method.

If you want to try it, AskApache.com compiled this set of htaccess rules. Make sure your site is working properly after implementing this code before walking away from your computer!

I suggest setting up redirects for all of your sites, whether you have a URL problem or not, just as a handy catchall to prevent problems in the future. Preventing a problem now is much easier than trying to fix it later!

  • 10shares

13 Comments on "Are URLs Case-Sensitive? How to Redirect Uppercase URLs to Lowercase URLs Using Htaccess or httpd.conf"
  1. Solomon says:
    May 31, 2014 at

    The information you’re linking to on the askapache website is definitely NOT the way to redirect capitals to lowercase. It can bring down a server in a shared environment. You should cross-check your information before you write an article based solely on someone else’s incorrect info.

    Reply
    • Alex Juel says:
      May 31, 2014 at

      Hi Solomon,

      I’d love it if you shared the correct way

      Thanks!
      Alex

      Reply
  2. Bunneah says:
    July 5, 2015 at

    I tried this and it worked to fix URL’s with bad capitalization; but it ‘broke’ my site. No images would load. Galleries were broken and I had to undo the changes.

    Reply
    • soman says:
      October 20, 2015 at

      Like Bunneah said. I also having the same problem some of images, css and js with uppercase is not loading. Can any one suggest me some solutions. Because i don’t want to change the image name to lowercase manually,.

      Reply
      • Alex Juel says:
        October 20, 2015 at

        Do you have access to the httpd.conf file? This method might work for you: https://brianflove.com/2014-08-11/lowercase-your-uris/

        Reply
  3. soman says:
    October 27, 2015 at

    I have only access to vhost.conf file. Will this work out in vhost.conf?

    Reply
    • Alex Juel says:
      October 27, 2015 at

      I’m not an Apache expert but from what I understand, the .conf file can be named anything, as long as it has the .conf extension. So yes, I think that would work.

      Reply
  4. soman says:
    October 27, 2015 at

    Hi Alex,

    Thanks for the information. I will try this

    Reply
  5. Manish Amberkar says:
    February 23, 2016 at

    Hi Alex, thanks for the guidance on this issue. We were looking for the url capitalization solution. So as you recommended in this article, we are going to use ‘httpd.conf file’ method for uppercase to lowercase redirection.
    But we also had set some manual redirects on our site based on editorial errors in past and some of these old urls also have uppercases in them. Do you think the new redirect rule will contradict with old manual redirects in some way? If yes, what would be the best work around?

    Reply
    • Alex Juel says:
      February 23, 2016 at

      Hi Manish, I honestly don’t know. These types of rules can be finicky. Fortunately you can always revert the file back to the way it was if you notice something weird going on with the site. I would recommend asking an expert at https://www.webmasterworld.com/apache/. That’s my go-to spot for getting technical questions like this figured out.

      Reply
      • Manish Amberkar says:
        February 24, 2016 at

        Thanks Alex

        Reply
  6. Dave Baker says:
    May 27, 2020 at

    404 on the Brian Love article — it has been moved — here is the correct URL:

    https://brianflove.com/2014-08-11/lowercase-your-uris/

    (changed from https:// to https://)

    Reply
    • Alex Juel says:
      May 27, 2020 at

      Thanks, Dave, updated!

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

  • 5 Content Strategies to Improve Your eCommerce Business Understanding the need for creating content on your website, and driving traffic, is one thing. Having that content meet your bottom-line business goals, however, is a bigger challenge […]
  • Case Study: Huge Revenue Increase After Data-Oriented Campaign Changes Data can do wonders if you know how to collect it and know how to analyze it. If you're not collecting and utilizing data from your traffic, transactions, and marketing efforts, then you […]
  • Are eCommerce companies too reliant on paid marketing? Our take from working with hundreds of companies. Are eCommerce companies too reliant on paid ads? Will they saturate their market? Our paid marketing team weighs in on these questions.
Alex Juel on lake beach.

Alex Juel

Alex’s specialty at Inflow is to link it up, wrap it up, get it out there and get results. He has experience with clients large and small in a wide variety of industries.

View Author’s Profile

Related Categories

  • Content Marketing (13)
  • Link Building (16)
  • On-Page SEO (14)
  • SEO Strategy (10)
  • Technical SEO (33)
  • Most Popular Posts:

    eCommerce Marketing Automations Systems Compared
    Technical Mobile Best Practices for SEO and Usability
    Expanding the Horizons of eCommerce Content Strategy
    Thin & Duplicate Content: eCommerce SEO
    5 Ways eCommerce Content Audits Can Increase Revenue
    Want to get content like this straight to your inbox? Subscribe to our weekly content alerts and monthly Inflow Insights newsletter now.

    Categories

    • SEO
      • Content Marketing
      • Link Building
      • On-Page SEO
      • SEO Strategy
      • Technical SEO
    • Paid Advertising
      • Goal Metrics and Analytics
      • Paid Search
      • Paid Search Shopping
      • Paid Social
    • Conversion Rate Optimization
      • A/B Testing
      • eCommerce Page CRO
      • Mobile Conversion Optimization
      • Tools and Plugins
      • Usability
    • Case Studies
    • eCommerce Strategy
      • KPIs and Reporting
    • Digital Marketing Trends in eCommerce
    • Inflow News

    Request a Proposal

    We'll build a custom proposal to meet your goals. Get the process started now.

    Google Premier PartnerInflow is a facebook-certified-creative-strategy-professional Moz Recommended Company Inc 5000 Inflow Clutch Profile
    • Services
      • SEO
      • PPC
      • Conversion
    • Case Studies
      • SEO
      • PPC
      • Conversion
    • Insights Blog
    • Resources
    • More
      • Contact
      • Careers
      • Press Info
      • Privacy Policy
    REQUEST A PROPOSAL
     
    CALL US AT 303-905-1504
    Monday - Friday, 8 a.m. - 6 p.m. (MST)
     
    facebook twitter linked-in linked-in rss

    Send this to a friend