Show Backtrace For ErrorHide Backtrace
#0  error_backtrace(1024, get_the_excerpt was called with an argument that is deprecated since version 2.3 with no alternative available., /var/www/vhosts/rynoweb.com/html/wp-includes/functions.php, 3008, Array ([function] => get_the_excerpt,[version] => 2.3,[message] => ))
#1  trigger_error(get_the_excerpt was called with an argument that is deprecated since version 2.3 with no alternative available.) called at [/var/www/vhosts/rynoweb.com/html/wp-includes/functions.php:3008]
#2  _deprecated_argument(get_the_excerpt, 2.3) called at [/var/www/vhosts/rynoweb.com/html/wp-includes/post-template.php:267]
#3  get_the_excerpt(180) called at [/var/www/vhosts/rynoweb.com/html/wp-content/plugins/wp-facebook-open-graph-protocol/wp-facebook-ogp.php:136]
#4  wpfbogp_build_head()
#5  call_user_func_array(wpfbogp_build_head, Array ([0] => )) called at [/var/www/vhosts/rynoweb.com/html/wp-includes/plugin.php:429]
#6  do_action(wp_head) called at [/var/www/vhosts/rynoweb.com/html/wp-includes/general-template.php:1634]
#7  wp_head() called at [/var/www/vhosts/rynoweb.com/html/wp-content/themes/rynoweb4/header.php:18]
#8  require_once(/var/www/vhosts/rynoweb.com/html/wp-content/themes/rynoweb4/header.php) called at [/var/www/vhosts/rynoweb.com/html/wp-includes/template.php:441]
#9  load_template(/var/www/vhosts/rynoweb.com/html/wp-content/themes/rynoweb4/header.php, 1) called at [/var/www/vhosts/rynoweb.com/html/wp-includes/template.php:417]
#10 locate_template(Array ([0] => header.php), 1) called at [/var/www/vhosts/rynoweb.com/html/wp-includes/general-template.php:35]
#11 get_header() called at [/var/www/vhosts/rynoweb.com/html/wp-content/themes/rynoweb4/single.php:1]
#12 include(/var/www/vhosts/rynoweb.com/html/wp-content/themes/rynoweb4/single.php) called at [/var/www/vhosts/rynoweb.com/html/wp-includes/template-loader.php:74]
#13 require_once(/var/www/vhosts/rynoweb.com/html/wp-includes/template-loader.php) called at [/var/www/vhosts/rynoweb.com/html/wp-blog-header.php:16]
#14 require(/var/www/vhosts/rynoweb.com/html/wp-blog-header.php) called at [/var/www/vhosts/rynoweb.com/html/index.php:17]
Notice: get_the_excerpt was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/vhosts/rynoweb.com/html/wp-includes/functions.php on line 3008

Clean URLs for Good SEO

I need not delve into the technical details of percent-encoding to make my point regarding keeping your URLs clean as part of your on-site search optimization, but some basic coaching is in order. I see a couple repeat offenses that bother me and I would like to discuss them here briefly in hopes of raising some awareness of the situation.

First major offense is the use of an apostrophe in URLs

Feel free to use them in the title and throughout the content of your page but do not use them in the URL structure. Search engines view an apostrophe in a URL as %27. So Google sees http://domain.com/don’t-do-this as http://don%27t-do-this. This causes issues with keyword separation and can very well cause issues in your search rankings. Some sites also have problems dealing with encoded characters as well. For example bit.ly and other URL shortening services have had issues properly linking to sites using apostrophes and other encoded characters in the URL.

If you use the WordPress platform for your site and/or blog it ‘should’ automatically fix your URL for you after you type your post title as you can see in the image below.

WordPress Cleans Apostrophes from URLs

Second major offense is the use of spaces in URLs

I don’t see spaces used in URLs as often as I see apostrophes but it is unfortunately still all too common.  Spaces cause a similar issue by displaying as %20 character. Hyphens are the preferred character for separating two words in URLs – do not use spaces or underscores. Don’t argue with me, there are many reasons for this, including the actual spec that explains it.
EDIT: 5 Aug 2011 – Matt Cutts re-explains the dashes-vs-underscores thing in this Google Webmaster Help Video.

Same goes for Filenames

While I’m at it, your filenames need to follow these same guidelines. You optimize your image and video filenames to include keywords (right? you should be!) and should be using hyphens to separate those keywords as you do in your URLs.

If you currently have these problems on your site – I don’t recommend editing your old URLs unless you’re prepared to create 301 redirects for all of them.  Do keep an eye on your new posts and be cognizant of the situation in the future and keep your URLs clean as part of your SEO strategy.

  • http://paulsutton.us Paul Sutton

    Is there a way to further clean up the urls by removing the source filetypes (e.g. .htm, .php) with .htaccess? The current method I use requires listing all pages with the .php extension to be listed, which can get monotonous, not to mention, would require editing each time a new page was added.

    • http://rynoweb.com Chuck Reynolds

      the extensions aren't so much of a big deal, but there is an easy way to remove them via htaccess mod_rewrite. Start with http://is.gd/elYoM and you'll get the idea.
      It's not really a problem but if you're already doing it, using mod_rewrite will help you so you don't have to edit page urls anymore – probably save you a few milliseconds on the fly too ;)

      • http://paulsutton.us Paul Sutton

        That's what I was thinking of, thanks. Just seems a bit nicer to be able to direct someone to yourdomain.com/pricing rather than yourdomain.com/pricing.htm, not to mention avoiding the 301 redirect if the site ever gets built in another language.

      • http://twitter.com/paulredmond @paulredmond

        The biggest issue in using the extension in a url design, is that you are exposing the server-side technology and application design to the end-user. You are also locking the url design to a specific language when it doesn't have to be.

  • http://aaron.kavlie.net Aaron Kavlie

    It's surprising how many sites still completely drop the ball on this one — big corprorate sites that ought to know better. Witness this from HP: http://www.shopping.hp.com/webapp/shopping/comput

    Also, this (among other things) is a useful filter for the legitimacy of SEO operations — if they go on and on about keywords, directories, search engine submissions, etc. while not saying a word about your URL structure, they're not worth listening to.

    • http://rynoweb.com Chuck Reynolds

      agreed. I highly doubt HP cares the slightest bit about their urls or any small technical aspect of on-site optimization like that. They're big enough and have so many inbound links they don't have to care – guys like us however and small biz need to squeeze every bit of optimization out of everything :)

      • http://blogpestcontrol.com thos003

        but doesn't HP's canonical cure this… From source code: <link rel="canonical" href="http://www.shopping.hp.com/webapp/series/category/desktops/200xt_series/3/computer_store"&gt;

        • http://rynoweb.com Chuck Reynolds

          Yes and No…. Google has only recently started to really handle those properly but nobody else really has – but in HP's defense, as I said they're big and don't need to worry about it as much, and the canonical links for them are probably the best they can do at this point to repair what has been done.

          Bing has was said to be working on the integration of canonical but they're more worried about combining their serps with yahoo's at this point. It'll happen but don't rely on canonical… Many other places that pull info and aggregate don't use it.

          It's good to have canonical tags in place but start with a good foundation of clean urls and site structure and you won't have to worry about IF some or all of the search engines are looking at your canonical tags

  • Darren Smith

    Fourth major offence – using apostrophes in plurals? (URL's) ;)

    • http://rynoweb.com Chuck Reynolds

      hah… did that just to show another one dropped in the url but yeah i know you mean

  • http://www.jamesmacdonald.co.za James MacDonald

    Same great tips laid out nicely and clearly. Many people don't take into account how they name files such as photo's etc. and include those dreaded underscores. One thing seems to be clear – think and plan before you just go ahead and do something with your website.

  • http://eof737.wordpress.com/ ElizOF

    Thank you Chuck! I learned some great tips from this post. As a blogger with limited insight to SEO and HTML, I frequently make the mistakes you mentioned and probably others I am unaware of. I appreciate your clear explanations. Any other thoughts would be appreciated.
    Best,
    Elizabeth

    • http://rynoweb.com Chuck Reynolds

      Thanks for reading and commenting – I'm a pretty bad blogger but I do put out a lot of good quit tidbits on twitter very often if you're interested in that. http://twitter.com/chuckreynolds (and yes I know I need to blog more lol)

  • vegasgeek

    Though it's not really a concern for SEO, it also bothers me when people use mixed-case when naming pages or files. Stick to all lower case file names and URLs!

    • http://rynoweb.com Chuck Reynolds

      lol agreed… that bothers me too but at least it's not damaging their SEO potential; well as long as they have the proper separator between the camel-cased words :)

  • http://www.firstfound-blog.co.uk Andy @ FirstFound

    Excellent advice there, thanks. I'm sick of seeing URLs20%like20%this, when it could all be solved with a hyphen. Never mind the SEO potential, it means people don't remember your URLs, it looks ugly when people share links and it's just plain lazy.

  • Ric Dragon

    If you’re going to chop the extensions off file names, you’ll want to end them with trailing slashes. Most servers will do this by default- but you’ll want to write your urls that way in links, too. Positive from seo perspective.

    • http://rynoweb.com Chuck Reynolds

      Agreed but most dynamic sites (like I am using wordpress as the example) don't use extensions. I think you meant to reply to the comment by Paul so I know what ya mean :)
      And yes trailing slashes are a good thing – and that's partially what canonical meta data is for too.
      Thx for the comment

  • http://www.websitefound.co.uk marco

    Excellent advice – this is pretty basic stuff in seo these days and is the least that people should be doing. You also need to make sure that you use good titles for your pages and that the URLS that show when you search have good keywords in them as the page title URL is very important to the search engine spiders.

    Choose your keyword first and then work your page title around your keywords – if you use wordpress sites you can change your url settings quite easily so that they appear in a format of words not numbers etc and you need to make sure that your site has been designed in a way that the pages display the URL as words and not numbers such as CAT6 etc

    Anyway pretty basic stuff

    • http://rynoweb.com Chuck Reynolds

      Indeed – perhaps that's another post I need to write, but wasn't the focus of this one :)

      Thanks for commenting Marco!

  • http://www.reddoorindy.com Mike Taylor

    Basic advice yes, but good solid advice too that I see a bunch of people still ignoring these days. I know I look back at some of the urls I created and just scratch my head wodnering what I was thinking when I came up with those.

  • http://www.easystreetrealty-indy.com EasyStreet

    I could have used some of this advice many years ago. We recently updated our URL structure and it has made a huge difference in our indexed pages, PR, etc. We still are trying to clean up all the duplicate content indexed with different session ID's and URL parameters we had used in the past. And our programmer loved to use _ all over our site. Hopefully using GWTs and a lot of canonicals we can get it cleaned up. Thanks for the post Chuck.

  • http://www.mswoods.com/ Mike from Indianapolis

    @vegasgeek I hear ya there? Mixing upper and lower case it annoying. It’s also, I heard, correlated with criminal tendencies. Of course, that could have more to do with lack of education than anything. When it comes to naming files, i like to stick with all lower case, and prefer hyphens to underscores. I can’t believe some people are using apostrophes in their URLs.

rynoweb powered by chuck, built on wordpress