Clean code = better rank

Discussion in 'Search Engine Optimization' started by lbrg, Nov 11, 2009.

  1. #1
    What do you guys think? does cleaning your website's HTML and CSS help search spiders?

    I think it does, they read the HTML on your page, and I think it's very important to have consistent and error free HTML/CSS.

    It's not always possible to have valid HTML though, especially with dynamically generated content.
     
    lbrg, Nov 11, 2009 IP
  2. larysmith711

    larysmith711 Notable Member

    Messages:
    3,374
    Likes Received:
    341
    Best Answers:
    0
    Trophy Points:
    215
    #2
    Nope... having cleaner code does not mean better rank. Why don't you go to some of the top ranking websites and see how many coding errors there are. Most have a lot!

    Google has said in the past that they think it's better for the user experience if a page load faster. BUT... you can still have sloppy code and a fast loading page.
     
    larysmith711, Nov 11, 2009 IP
  3. sequencehosting

    sequencehosting Peon

    Messages:
    170
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I disagree. The reason the high rank sites have bad code is because the sites were made a long time ago. Why would they bother changing the code if they already rank high?

    Google take the code over content ratio into account. The less code the easier it is for the search engines to find the content. Cleaner code brings structure to a website.
     
    sequencehosting, Nov 11, 2009 IP
  4. larysmith711

    larysmith711 Notable Member

    Messages:
    3,374
    Likes Received:
    341
    Best Answers:
    0
    Trophy Points:
    215
    #4
    That logic makes no sense. So... it's OK for Google to rank websites with bad code if the websites are old???? *ROFL*

    http://www.seobook.com/archives/001925.shtml

     
    larysmith711, Nov 11, 2009 IP
  5. Toon-c

    Toon-c Well-Known Member

    Messages:
    1,775
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    180
  6. sequencehosting

    sequencehosting Peon

    Messages:
    170
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ok think about this for a second. The majority of websites ranked high have been around for longer hence more backlinks, longer domain, a already existing audience etc. Since they already ranked high there is no reason for them to change.

    Now Google has changed a lot since these sites have been ranked. The reason they are still ranked high is because they still deserve to be up there.

    You also need to think beyond this. We all know Google must prefer a faster loading site since they are always trying to speed up the web. Clearner code = faster page load. This is clearly going to have an affect on your ranking because the faster your website the better experience for the visitors.

    Please tell me you don't think a website coded with HTML tables is the same or better for SEO than a clean CSS/XHTML design? A table inside a table inside a table is really not going to help a websites rank.
     
    sequencehosting, Nov 11, 2009 IP
  7. lbrg

    lbrg Peon

    Messages:
    195
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This is how I look at it myself.

    Content is part of site organization. If you're looking to make it easier to have crawlers go through your page, clean up your code and set up a few nofollow links or open new channels for crawlers to find new content.
     
    lbrg, Nov 11, 2009 IP
  8. BlueIce08

    BlueIce08 Member

    Messages:
    535
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    33
    #8
    I'm caught in between on this one, personally it can only have good effects if you have taken the time to clean your code and in the future rankings this may well play a part. However as has previously been mentioned a lot of the top sites don't have clean code, it is fairly common knowledge also that the better ways to increase a sites rank don't really have much to do with how clean your code is.

    For a better user experience though I will always recommend taking the time to make sure your code is as clean as possible.
     
    BlueIce08, Nov 11, 2009 IP
  9. ontheroad

    ontheroad Greenhorn

    Messages:
    88
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #9
    Validation of your code does not affect your rankings. This has been a topic for years.
    Now the way your code is layed out, it can make a difference.
    What I mean by this is, if your content is far down on the page and in the source code, then you are lowering the authority of it. The higher up you have your links and content the more importance you are giving them.
    Most people now days use css to do these types of techniques....which google has came out and said css is not a black hat technique, they view it as a design function.

    Does this make a huge difference if your content in your code is placed up high or down low...most say no, but you need to also admit that every little bit helps.

    I might have gotten off topic here, so clean code = better rank? No. You'll find many articles and test done out there based on if your code is validated or not. And 90%+ all come to the same conclusion, it doesn't effect or help rankings.
     
    ontheroad, Nov 11, 2009 IP
  10. lbrg

    lbrg Peon

    Messages:
    195
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Ah, I didnt mean validated code, I simply mean clean and organized code. It's virtually impossible to validate your HTML nowadays, especially if it's dynamically generated content.
     
    lbrg, Nov 11, 2009 IP
  11. ontheroad

    ontheroad Greenhorn

    Messages:
    88
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #11
    In a general sense then, No it doesn't help your rankings.

    If you are able to move your links and content towards the top of the source code and use css to move it visually, then that can help. Not saying it'll bring your top rankings, but like I stated before, every little bit helps.

    The spiders will not leave you site so quickly if the code is clean and simple. If you have a lot of dirty code or javascript to sift thru, then the spiders have a tendancy to leave your site before even finishing the full crawl.

    I personally have never seen a difference between the two to give better rankings.

    And sorry for wasting your time about validating code. :)
     
    ontheroad, Nov 11, 2009 IP
  12. lbrg

    lbrg Peon

    Messages:
    195
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #12
    No worries at all!

    Thanks for your feedback, you're probably right, in the end, it won't really make a difference. Keeping clean code is a good habit though, i guess :p
     
    lbrg, Nov 11, 2009 IP
  13. ontheroad

    ontheroad Greenhorn

    Messages:
    88
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #13
    With all the great CMS's out there, you shouldn't have to worry about dirty code anymore. Majority of them keep their code very simple and clean.
     
    ontheroad, Nov 11, 2009 IP
  14. webwest

    webwest Peon

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Clean code alone won't help ranking - several have already stated that here. But if you have a bunch of (ie) nested tables, crappy database URLs, javascript dropdown menus and other stuff that makes the SEs have wade through it to find your real content, cleaning up the code can definitely help.

    A race car owner always starts with state of the art racing engine and drivetrain and builds on that instead of trying to hot rod a 68 VW and expect to win the race ...
     
    webwest, Nov 11, 2009 IP
  15. Canonical

    Canonical Well-Known Member

    Messages:
    2,223
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    110
    #15
    99.9+% of the pages on the web have validation errors on almost every page of the site. Google and the other engines have been been crawling and indexing "bad" HTML for a LOOOOOOOOOOOOOONG time. They are good at it.

    Is it good to have valid HTML? Yes. Should you thrive to generate valid HTML? Sure... but don't kill yourself over it. The payback is practically nil. If you have 50 validation errors on a page today and you fix them all will your rankings improve even 1 position. More than likely... No.

    Unless the invalid HTML is preventing them from extracting some portion of that content so that it can be considered by the ranking algorithm, fixing the errors is not going to help your rankings.

    I wouldn't lose one bit of sleep over validation errors unless they are in some way preventing your content from being indexed or preventing some portion of your site from being crawled.
     
    Canonical, Nov 11, 2009 IP
  16. solarpanelsdirect

    solarpanelsdirect Peon

    Messages:
    152
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I will agree that validation is not entirely important. I do write my code in XHTML compliance, however i usually get at least 2-3 errors due to some javascript (like google checkout code is impossible to make the page compliant) however I will say that clean code does have an effect, but very very minimally, but it should be a practice anyways, faster content load times, and XHTML compliance means it will be rendedered the same in all browsers, so even 20 years from now in Firefox V20.5 your website would still render the same.
     
    solarpanelsdirect, Nov 11, 2009 IP
  17. YugoSlavac

    YugoSlavac Well-Known Member

    Messages:
    1,345
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    105
    #17
    Almost every website has an error in their source code. If the ranking system worked like that, than nobody would have a good rank. It's about how you create your content, not the source code. I think Google has a couple of errors as well.

    Yugo,
     
    YugoSlavac, Nov 11, 2009 IP
  18. Traffic-Bug

    Traffic-Bug Active Member

    Messages:
    1,866
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    80
    #18
    This was brought up in the seochat forums. If you search for 'code to text ratio' you will find it. But I think it doesnt have major effect in seo ranking, only a minor effect. Because you can still have lots of un-clean html and your page can still load faster and render properly compared to clean code that is also overloaded so much that it loads slowly. It is more about website optimization than about seo ranking.
     
    Traffic-Bug, Nov 11, 2009 IP
  19. SunstarShop

    SunstarShop Peon

    Messages:
    582
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Clean code can make SE more easy to crawl your pages and come more often! So clean code is a little help for the ranking!
     
    SunstarShop, Nov 11, 2009 IP
  20. b4db0y

    b4db0y Notable Member

    Messages:
    3,523
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    205
    #20
    b4db0y, Nov 11, 2009 IP