Skip to main content
added 576 characters in body
Source Link
henrywright
  • 285
  • 1
  • 2
  • 10

My website's URLs are currently case-insensitive. For example, both of the following links show the exact same page:

  • http://example.com/about
  • http://example.com/About

However, taking a look at the wordpress.org website, I noticed that URLs are case-sensitive. For example, the second link below is a 404 error page:

  • http://wordpress.org/about
  • http://wordpress.org/About

My thoughts are to make my website's URLs case sensitive. Aside from the obvious issue of avoiding duplicate content, what are the pros and cons of having case-sensitive URLs?

Update

Google seems to operate a case-sensitive URL policy on their own URLs. For example, the second link below is a 404:

  • http://google.com/doodles
  • http://google.com/Doodles

Update 2

Thanks for your answers. I decided to take the advice mentioned in the accepted answer and implement 301 redirects where necessary. Since I'm working with WordPress, my code solution is as follows (in case anyone is interested):

function force_lowercase_urls() {
    
    if ( is_admin() )
        return;
    
    if ( preg_match( '/[A-Z]/', $_SERVER['REQUEST_URI'] ) ) {

        wp_redirect( strtolower( $_SERVER['REQUEST_URI'] ), 301 );
        exit();
    }
    
}
add_action( 'init', 'force_lowercase_urls' );

My website's URLs are currently case-insensitive. For example, both of the following links show the exact same page:

  • http://example.com/about
  • http://example.com/About

However, taking a look at the wordpress.org website, I noticed that URLs are case-sensitive. For example, the second link below is a 404 error page:

  • http://wordpress.org/about
  • http://wordpress.org/About

My thoughts are to make my website's URLs case sensitive. Aside from the obvious issue of avoiding duplicate content, what are the pros and cons of having case-sensitive URLs?

Update

Google seems to operate a case-sensitive URL policy on their own URLs. For example, the second link below is a 404:

  • http://google.com/doodles
  • http://google.com/Doodles

My website's URLs are currently case-insensitive. For example, both of the following links show the exact same page:

  • http://example.com/about
  • http://example.com/About

However, taking a look at the wordpress.org website, I noticed that URLs are case-sensitive. For example, the second link below is a 404 error page:

  • http://wordpress.org/about
  • http://wordpress.org/About

My thoughts are to make my website's URLs case sensitive. Aside from the obvious issue of avoiding duplicate content, what are the pros and cons of having case-sensitive URLs?

Update

Google seems to operate a case-sensitive URL policy on their own URLs. For example, the second link below is a 404:

  • http://google.com/doodles
  • http://google.com/Doodles

Update 2

Thanks for your answers. I decided to take the advice mentioned in the accepted answer and implement 301 redirects where necessary. Since I'm working with WordPress, my code solution is as follows (in case anyone is interested):

function force_lowercase_urls() {
    
    if ( is_admin() )
        return;
    
    if ( preg_match( '/[A-Z]/', $_SERVER['REQUEST_URI'] ) ) {

        wp_redirect( strtolower( $_SERVER['REQUEST_URI'] ), 301 );
        exit();
    }
    
}
add_action( 'init', 'force_lowercase_urls' );
edited tags
Link
Stephen Ostermiller
  • 99.4k
  • 18
  • 141
  • 364

Case sensitivity of URLs Should URL paths be case sensitive?

added 12 characters in body
Source Link
Simon Hayter
  • 33.1k
  • 7
  • 60
  • 119

My website's URLs are currently case-insensitive. For example, both of the following links show the exact same page:

However, taking a look at the wordpress.org website, I noticed that URLs are case-sensitive. For example, the second link below is a 404 error page:

My thoughts are to make my website's URLs case sensitive. Aside from the obvious issue of avoiding duplicate content, what are the pros and cons of having case-sensitive URLs?

Update

Google seems to operate a case-sensitive URL policy on their own URLs. For example, the second link below is a 404:

My website's URLs are currently case-insensitive. For example, both of the following links show the exact same page:

However, taking a look at the wordpress.org website, I noticed that URLs are case-sensitive. For example, the second link below is a 404 error page:

My thoughts are to make my website's URLs case sensitive. Aside from the obvious issue of avoiding duplicate content, what are the pros and cons of having case-sensitive URLs?

Update

Google seems to operate a case-sensitive URL policy on their own URLs. For example, the second link below is a 404:

My website's URLs are currently case-insensitive. For example, both of the following links show the exact same page:

  • http://example.com/about
  • http://example.com/About

However, taking a look at the wordpress.org website, I noticed that URLs are case-sensitive. For example, the second link below is a 404 error page:

  • http://wordpress.org/about
  • http://wordpress.org/About

My thoughts are to make my website's URLs case sensitive. Aside from the obvious issue of avoiding duplicate content, what are the pros and cons of having case-sensitive URLs?

Update

Google seems to operate a case-sensitive URL policy on their own URLs. For example, the second link below is a 404:

  • http://google.com/doodles
  • http://google.com/Doodles
Tweeted twitter.com/#!/StackWebmasters/status/518473980299075584
Post Migrated Here from wordpress.stackexchange.com (revisions)
Source Link
henrywright
  • 285
  • 1
  • 2
  • 10
Loading