Your Website Code May Not Be As Clean As You Think

by on September 22, 2009

bigstockphoto_Goals_1036912Editors update: March, 13th, 2010

True story: About two weeks ago, I came across a website that listed top SEO companies – well-known SEO companies at that. The website had used a site validator to see how clean the top SEOs’ site codes were. I stared in shock and then started gloating.

Several of the top name SEO companies had more errors than you could shake a stick at – and these people are supposed to know how to optimize website code. Further down on the page were other big name websites, such as the BBC, with just as many errors.

Horror of Optimization Horrors

While sharing this information with my programmer and coding specialist, she made a strange comment. “You know, that’s something I haven’t thought of, running a site validation.” Well, I had the site redesigned shortly before she came on, by a professional designer. I just KNEW our site code would be clean and I could continue gloating.

The first page we ran the W3C Site Validator on had thirty-three errors. Thirty-three! My programmer informed me that, since she had planned on updating the site anyway, these errors could be quickly solved. I took a deep breath and we went on to the next page. Seven-eight errors!

On each consecutive page, error after error was found. I had taken so many deep breaths I felt like I was hyperventilating. She swore she’d clean it up and, after taking one more deep breath, I left it in her capable hands.

A thought occurred to me then, which is the foundation of this blog. “If SEO companies who are supposed to know clean code can have errors like this (and I include mine), what about webmasters that have to rely on outside help?” In other words, if you don’t know programming and you don’t have an in house programmer you can trust, how do you know YOUR site code is… well, up to code?

  1. Run each page through the W3C Markup Validator. It will give you a list of errors and information on how to fix them. You’ll probably need a little programming background. If you don’t have any programming knowledge but you do have errors, you can hire a professional programmer to do the work and then run the Validator yourself to make sure they’ve done the job right. According to my programmer, it took her ten minutes to a half hour per page, depending on the number of errors. Factor that in when hiring.
  2. Run your stylesheets (CSS) through the W3C CSS Validator. It will also give you a list of errors and how to fix them. Again, you may need a little bit of CSS coding background and, again, if you don’t have any, you’ll need a professional. According to my programmer, it took her ten minutes to clean up our CSS,  but there weren’t that many errors.
  3. Use the W3C Link Checker. Not only does this check for broken links, but it also shows where you have redirects. In running our site, we had 400 redirect links when only two were intentional. How did this happen?

There’s a programmer’s shortcut: instead of using the whole URL to indicate where a page will pull its content from, they use a series of path codes that look like this:

/../../filename.extension

Unfortunately, this doesn’t sit well and the engines will use this path to redirect to the full URL. It’s messy and it takes longer, which slows down the time it takes to load your site.

The moral of the story:

A website’s code is just a part of search engine optimization. However, it’s a huge part of how your website performs for the user. If you’re not sure how clean your website is, take a few minutes to run it through W3C. You may be surprised how bad (or good) your code really is.

I wanted to add this wonderful post aptly named W3C Validation for SEO – Myth and Reality by Alan Bleiweiss

Another great articles about W3C that I recently read was “W3C Validation for SEO? Separating Facts From Fiction” at Springboard SEO



{ 18 comments… read them below or add one }

SEOcopy November 7, 2009 at 5:24 am

You are absolutely right, but if we are going to give out advice & call ourselves SEO geeks then I think we should make sure our code is clean. I say lead by example, and it really doesn't take any more time on your part. We pride ourselves on checking every little thing… I guess attention to detail is a huge thing for me.

Reply

Edinburgh Removals Guy November 7, 2009 at 4:42 am

All the websites I've ever built have been valid. I feel this is one of the most important parts of designing a decent site. It's important to have standards to work to.

But….it doesn't seem to make an ounce of difference to the search engines whether you're valid or not….infact Google flags up errors if you run it through the validator.

Reply

SEOcopy September 29, 2009 at 12:10 pm

Gracias telefonia always nice to see people are paying attention. It won't be difficult just follow their instructions and remove all the mierda code and you will be fine.

Reply

SEOcopy September 29, 2009 at 12:08 pm

Omg you too. I saw some stuff on there I was like wtf? Who put that stuff on there? Suffice it to say so many different hands touched this thing that I am glad we only have ONE person messing with our code. Thanks for joining he conversation Jacob btw “I’m currently a full-time student at ITT-Tech pursuing web design.” very impressive ;)

Reply

Jacob Stoops September 29, 2009 at 11:51 am

You're right, you definitely need to clean your code. However, when I validate, there are some pretty weird things that come up as errors such as page breaks
versus versus

Weird stuff.

Reply

Telefonia Empresarial September 29, 2009 at 7:00 am

Very helpful article..expect to see more like that…I'll try the W3C & to see how it works .

Reply

SEOcopy September 29, 2009 at 5:23 am

Hey Rafael no kidding huh? I was discussing this with another SEO geek & need I say an argument ensued. lolAmazing at how some SEO people forget the most basic functions. I personally want to say I don't care what Google does but, would that be smart? It's in their “how to” so we follow the rules and add a few new rules that work for our clients. Thanks for keeping the conversation going.

Reply

Legal Dictionary September 28, 2009 at 6:23 am

I didn't know about that Validator. Useful bit of kit thanks- although it means more work haha :)

Reply

rafaelmontilla September 28, 2009 at 7:03 am

Do not forget the W3C RSS Validator and W3C sitemap Validator

Reply

SEOcopy September 28, 2009 at 6:32 am

Just when you thought you had crossed all your T's and dotted all your I's ;) have a good day cal!

Reply

SEOcopy September 25, 2009 at 4:54 am

Indeed & the way I see it there is tons of information out there. Some take their time giving it to you or hold you hostage for an email or a name. At Level343 we treat our readers as friends and we share our knowledge for free. Thanks for sharing in our conversation joel

Reply

SEOcopy September 25, 2009 at 4:52 am

Yeahhhh I am glad we were able to help you. That just made me smile and it's not even 7:00 am. Okay now for more coffee and more tips & discussion to give away. Come back & join in the conversation.

Reply

Photoshopedia September 25, 2009 at 12:14 am

Very interesting post, I am newbie in this domain so it was very useful for me. I used W3C and I discovered some errors to my web site so thanks for sharing with us.

Reply

joel0719 September 24, 2009 at 11:38 pm

very helpful article..it's just a matter of knowledge…I tried W3C & works great.

Reply

Free VOIP Calls Worldwide September 24, 2009 at 5:36 pm

Excellent article. It was helpful and informative. hope to see more greats posts like this.

Reply

SEOcopy September 23, 2009 at 11:05 am

Amazing at how many SEO professionals I know got very “pissy” (lack of a better word) about doing that. when I brought it up at an SEO chat. Like it was beneath them since they find no value in being validated. Personally I think it's unfortunate, almost like no pride in the work you put out there. To have clean code is a big plus at least imho. Thanks for your input

Reply

Lito September 23, 2009 at 2:55 am

Yes you are right. It's worth the time checking a website to W3C validator to be sure.

Reply

FranchiseUK September 22, 2009 at 5:15 am

Hi Gariella
Great post and some helpful info here on code validation. We ran this on our site some time ago and did all we could to fix as many errors as possible. Actually it didnt really make any difference SE ranking-wise as it seems search engines don't judge ever so highly on whether a site has perfectly clean code or not but surely its good practice and where possible it makes sense to cross as many t's and dot as many i's as possible. And the unintentional redirects you point out could indeed have implications on ranking if there are alot of 404 errors as a result.

Joe

Reply

Comment Guidelines: The comment form must be filled in with an actual name. This blog is actively moderated, and comments with keyword names will be deleted. We reserve the right to edit or delete any comments using keywords, spam or splog-like URLs, or suspicious information in the comment form.


Linking Guidelines: We welcome links that encourage and continue conversation, such as links to related blog pages. If you've written about (or read elsewhere) the article topic and feel the piece would enhance ours, please, do share. Again, this blog is actively moderated. If we come across a link we don't feel enhances the conversation, we'll simply unlink it.

Leave a Comment

{ 10 trackbacks }

  • KGBTexas

    "Your Website Code May Not Be As Clean As You Think" The Gabinator knows. http://bit.ly/MmtPc (via @level343)

  • Lohith Amruthappa

    RT @level343 Your Website Code May Not Be As Clean As You Think | Level343 Articles http://bit.ly/R2jB6

  • Level-343 Team

    Horror of Optimization Horrors http://ow.ly/qHFC

  • Level-343 Team

    OMG! Your Website Code May Not Be As Clean As You Think http://ow.ly/qQp1

  • Level-343 Team

    http://ow.ly/rsif Horror of Optimization Horrors does it really matter?

  • Bharath Reddy Punuru

    Your Website Code May Not Be As Clean As You Think http://ow.ly/vzPV

  • Gabriella Sannino 

    Simple easy to follow instructions on how to clean you code. http://ow.ly/FzkS If I can do it trust me so can you ;)

  • Gabriella Sannino 

    Your Website Code May Not Be As Clean As You Think http://ow.ly/Uyx5 ~ maybe not spring cleaning but look sharp for 2010

  • Level-343 Team

    Your Website Code May Not Be As Clean As You Think http://ow.ly/UyvY ~ maybe not spring cleaning but look sharp for 2010

  • Gabriella Sannino 

    Your Website Code May Not Be As Clean As You Think- http://ow.ly/1jmuv ~ There should be pride & standards in any website, no excuses.