3

I have web directories with upper case letters and site is on Apache server.

Example: www.example.com/ServiceTools/page.htm

I have read that using upper case letters in folder name is bad practice and could cause problem with accessing page and produce 404 pages?

Should I change folder to lowercase and will this have influence on SEO?

www.example.com/servicetools/page.htm

2 Answers 2

3

Having capital letters in your URL is perfectly fine. It doesn't affect the performance of your website and shouldn't cause any problems for search engines.

I can only guess that whomever told you it could cause 404 errors meant that if someone typed in the URL manually and didn't use capital letters that the page would not be found. That's true but the reverse is also true (if someone uses capital letters and your URL has none) so that's hardly useful information. But if you are concerned about this affecting your users you can always use mod_speling (yes, one L) to allow your URLs to be case insensitive.

As far as capitalization affecting search engines, since they follow links and sitemaps they won't be using the wrong URL unless you tell them to.

1
  • I am with 1&1 Apache server Original URL is www.domain.com/Folder/page.htm When I type: www.domain.com/folder/page.htm I got the page but it changes to www.domain.com/Folder/page.htm As I am obviously not expert as you guys – please advise what I have to write in .htaccess to change uppercase to lowercase for 5 different web folders (Archive, Company, ServiceTools etc) Commented Dec 16, 2013 at 18:46
2

Having mix case URLs will cause some 404 errors:

  • Users that type in URLs typically do not capitalize.
  • Some badly configured bots lowercase all URLs before fetching them. (I worked on a site with mixed-case URLs and we saw this occasionally.)

I would recommend putting something in place to handle the visitors that get to the all lower case URL. That could be:

  • Making the canonical URL all lower case as you suggest
  • Putting in a redirect from the lower case URL to the mixed case URL (so that the mixed case URL is the canonical)
  • Configuring your server to be case insensitive so that the content gets served at either URL, then using a meta rel canonical tag to tell search engines which one to index.

It is generally easier to put redirects in place to correct the case of URLs when the URLs are all lower case. That is because redirecting to a lower case URL is a simple rule that can be handled by character substitution and a rewrite rule. When you have mixed case URLs, you have to do a database or file system lookup to know what the correct case for any given URL should be before issuing the redirect.

6
  • Hi Stephen, I am with 1&1 Apache server. As I am obviously not expert as you guys – please advise what I have to write in .htaccess to change uppercase to lowercase for 5 different web folders (Archive, Company, ServiceTools etc) Commented Dec 16, 2013 at 18:48
  • Here is a rewrite rule to redirect all your URLs to their lower case forms: stackoverflow.com/a/17837782/1145388 You could use that after simply renaming all the folders and files to be lowercase. Commented Dec 16, 2013 at 18:58
  • Can you advise how to use five separate conditionless RewriteRules instead of mod_rewrite rule (as I have no access to config files). Thanks! I just need for folders - files are fine. Commented Dec 16, 2013 at 19:33
  • That rewrite rule can be used in .htaccess Commented Dec 16, 2013 at 19:36
  • Can you write example? Commented Dec 16, 2013 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.