Can You Improve Rankings by Cleaning Up Website Code?

Sep 12, 2007 • 9:00 am | comments (4) by twitter | Filed Under Google Search Engine Optimization

A WebmasterWorld thread asks if cleaning up code will improve Google Rankings. Can removing bad code get better rankings in the SERPs?

Not so much for Google, as one webmaster points out. He has had better success with MSN when he cleaned up his code.

Other benefits of clean code include increased repeat visitors (faster load times) and the increased ability to get links from authority sites.

Meanwhile, some people are expecting that this may be a problem in the future.

I spent a lot of time over the past 6 mos cleaning up my code so that each page validates. While I don't think there's any benefit to Google if you skip an Alt tag here and there, there is the idea that this could matter in the future. As Google marches along it increases the characteristics that are important to the algo. By doing this housekeeping, you are ready if this happens.

Tedster echoes this sentiment:

The most problematic kinds of true errors in your HTML mark-up can be very difficult to spot by eye - they really need a tool, such as the W3C HTML Validator, to be ruled out with certainty.

What are these problems? Things like an unclosed quotation mark or a missing angle bracket on a tag. You can stare for hours at your source code and miss that kind of thing. But until you fix that kind of error, there is a section you intended as content that just looks like an invalid attribute, or something like that. Browsers have different error recovery routines, and just because the content displays on screen is no guarantee that Google's index will "see" it as content.

Eventually Google's error recovery routines may pick up a clue farther along in the code - and after that point, the rest of the page can be indexed. But there can easily be a gap, sometimes with important content, that just gets skipped. I speak here from painful experience.

It's something to keep in mind for the future, but it's not a big deal now unless your code is bad enough that the Googlebot is choking on it.

Forum discussion continues at WebmasterWorld.

Previous story: Do You Need a Break from SEO?


Michael Martinez

09/12/2007 04:59 pm

Clean code and valid code are two different things. Both valid and invalid code can seem very lean, very bloated, very clean, or very "dirty". Meeting all syntactical requirements doesn't mean your code will validate. But those people who are holding out for Google and other search engines to require W3C-compliant code for rankings are chasing SEO myths.

Rob Abdul

09/13/2007 10:45 am

VALID CODE Of the hundreds of sites that I worked on, performed SEO & analyzed web statistics; I am of the opinion that W3 Compliancy has no effect on SERPs to date. CLEAN CODE MSN ranks pages with minimal content better than Yahoo and Google. Therefore cleaning your code and thus reducing the page size gives you higher SERPs in MSN. CONCLUSION It is good/best-practice to aim for valid code as it helps the less able to access web content via, brail keyboards, screen readers etc.

Matt Bennett

09/13/2007 04:02 pm

I see good coding and validation as another part of the SEO pie. I think it is one of the things that all search engines look for but in the grand scheme of things its not a very big part of that pie!

amit verma

09/14/2007 06:09 am

Clean code always help in Seo...and why not ? you are having a valid code which is easily readable to search engine spiders and robots. thanks, amit verma

blog comments powered by Disqus