A client recently contacted me to fix their website. Someone had contacted my client saying that they got an error page when trying to access a specific page. Let’s say the webpage address was www.yourwebsite.com/example/. What happened is that the potential visitor typed in www.yourwebsite.com/Example/ with a capital E.
The Problem: One of your potential website visitors accidentally types in the wrong case and gets an error message instead of the expected content.
The short answer to my client is “yes, we can ‘fix’ it” but this is actually a semi-complex little issue that affects most websites and is worth looking at.
Case Sensitivity Depends on Your Web Server:
Linux/Unix = Case Sensitive & Search Engine Safe
Let me start by saying that all websites on standard Linux/Unix-based servers are case sensitive and roughly 60% of the websites out there run on Linux servers(1). So in my client’s case above, I would not classify their case-sensitive link as an error, per say, on their website. Normally we just click on a hyperlink somewhere and never have to think about proper capitalization. It is true that some people may try to type the link and use the wrong case leading to an error page. But again, that is true of 60% off all website links. But what about when you create an easy to remember link that you want potential visitors to remember and type in when they get home? You tell your potential visitor, “just go to mywebsite.com/wizzbang” for more information. If that potential customer thinks wizzbang should be capitalized and types in mywebsite.com/Wizzbang with a capital W. They will get an error page (sometimes known as a 404 Error Page).
There are six ways (probably more) to remedy this:
1) Create a duplicate page = Bad for webmaster, bad for search engines. This would be a headache to maintain and would cause you to be penalized for duplicate content by search engines.
2) Create a blank page with a meta-data redirect = Mediocre for website visitors, bad for search engines. Visitors are likely to experience slowdown as the server loads the initial redirecting page and then loads the second page. While this will work ok for your visitors, my understanding is that most search engine spiders will not follow META redirect tags.
3) Create a custom 404 error page = Good general catch-all: By creating a custom 404 error page, you can hopefully capture the potential visitor by presenting them with a branded page with navigation links that will hopefully help them find the web page they were looking for. It is a good idea for all websites to set up a custom 404 error page.
Here is what a 404 error looks like without a custom error page:
4) Create 301 redirects = Great for website visitors, Best choice for search engines: 403 redirects tell the search engines where to go when someone types in a specific link that you want to redirect. I think they were originally created to tell search engines when a page has been permanently moved to a new location, but they are also the solution of choice for redirecting links that are prone to capitalization user errors.
For the mywebsite.com/Wizzbang example we used above, you would add this code to your .htaccess file to “fix” the problem:
redirect 301 /Wizzbang/ http://www.mywebsite.com/wizzbang/
Now, when someone types in “www.mywebsite.com/Wizzbang”, the visitor is redirected to the correct www.mywebsite.com/wizzbang page AND (this part is important) you have also told the search engine that anytime someone types in “www.mywebsite.com/Wizzbang” that the page they really need to go to is “www.mywebsite.com/wizzbang” and to update their records accordingly. Happy website visitor. Happy search engine. Happy client.
(5) Advanced: Custom script that automatically renames all urls to lower case. This is an advanced solution that is is outside the scope of this post.
(6) Advanced: Canonical URLs can help with the issue of search engine duplicate content. Find out more about it here from Google’s Webmaster Central
Windows server = Not Case Sensitive & Potentially Search Engine Unsafe
Windows based web servers are not case sensitive so if one person typed “wizzbang” and another typed “Wizzbang” they would both end up at the same page. But that can lead to Search Engine Optimization issues. The problem comes when you have a windows server and you (accidentally) or others (out of your control) link to your pages with different capitalizations. Search engines like Google will see www.mywebsite.com/wizzbang” and “www.mywebsite.com/Wizzbang” as two separate pages with duplicate content, which then leads to penalties for duplicate content.
Recent Comments