Home » Technical SEO » Currently Reading:

SEO for Web Developers

May 4, 2010 Technical SEO 5 Comments Barry Adams

I’m due to give a talk at one of those surprisingly fun crowdsourced unconferences – BarCamp Belfast. My talk will be about what web developers can do to ensure the websites they build are search engine friendly. Too often I’ve had to work with websites that seemed built to thwart search engines instead of welcome them, so it’s a topic dear to my heart.

I’ve had some great input from the members at the SEO Training Dojo and have a clear idea of what I want to discuss in this 30-minute talk I’ll be giving, but I figure it never hurts to get some extra input. I’m sure the the State of Search audience has their own horror stories about SEO-unfriendly websites to share.

Anyway, here are my key points for web developers to keep in mind when developing SEO friendly websites:

Parameters in the URL – resist the urge

I know it’s easy. I know it makes perfect sense for coders. I know it helps keep things transparent. But please, for the sake all SEOs around the world, don’t put parameters in your URLs!

There are countless things that can go wrong with URLs containing parameters, from duplicate content issues to indexation-loops. But worst of all, search engine spiders really don’t like parameters. Yes, with Webmaster Tools you can tell Google what parameters you are using, but really, that’s like using a band-aid to fix a severed limb.

Your URLs should be static, straightforward, and human-readable. No parameters. If you can’t build a website that serves only static URLs, you shouldn’t be a web developer. There’s no excuse to use query values, session IDs, viewstates, or any other type of parameter in your URLs.

Just to make sure you really get it, here are two examples:

  • This is a bad, bad URL: http://www.example.com/default.aspx?p=20&num=100&id=AE987BC1220CXH&x=…
  • This is a good URL: http://www.example.com/category/product/

The URL doesn’t have to end in .html, it doesn’t even need a hierarchical structure (though for site management purposes I do recommend it), but please for the sake of all that is right, don’t use parameters!

[Note: there are always exceptions, but if you give web developers a finger they'll take your whole bloody arm, so I won't mention any of them here.]

Structure your code as if your in-laws are visiting

You know that sudden feeling of dread you experience when your partner kindly informs you your in-laws are coming to visit, and you look around the house and it’s as if a clusterbomb went off? Yes?

Now I want you to experience that same dread every time you look at your own code and you can’t immediately tell when your navigation ends and your content begins.

Code structure is one of the hardest things to do, but clean code pays itself back in so many different ways that it’s worth every bit of the effort you’ll be putting in to it. From faster load-times to cross-browser compatibility, from manageability to (of course) SEO, clean code helps!

Here are some tips to keep in mind when coding up a website to make sure your code doesn’t get you in trouble with your in-laws.. eh, I mean your SEO:

  • Use unsorted lists for the navigation
  • Put the body content high up in the code
  • Use h1-h2-h3 tags for headlines
  • Keep the body content in an unbroken segment
  • Use standard code for bold & emphasized text
  • Try to minimise CSS and JavaScript in the page code but keep it in separate files
  • Concentrate your CSS and JavaScript in as few files as possible
  • Put the code for trackers & analytics at the bottom
  • Try to limit browser repaint events
  • W3C compliance is not a must, but it doesn’t hurt to aim for it

Know your HTTP status codes

You know when you call someone on their mobile, and it rings a couple of times, and then you hear them say “hello” and you say hello back and start talking only to suddenly realise it’s the voicemail you’re talking to? It sucks, doesn’t it. It just isn’t funny. You think you’re talking to a real person but instead you’re jabbering to some dumb machine.

Sending the wrong HTTP status codes is exactly like that. When a page doesn’t exist, don’t send a 200 code and redirect to the homepage. Send a 404! When a page has been permanently moved or has expired, don’t send a 302, send a 301! Gone is gone, and using a 302 temporary redirect is like moving homes and sending your mates a card saying that you’ll only be moved for a short while instead of forever. There’s a big chance they’ll show up at the wrong place for your house-warming party.

Understand your HTTP status codes, know which one to use when, and don’t try to be clever with them – it’s not gonna work.

Sharing the pain
Even though I have plenty more to say about SEO for web developers (be nice and put GA tracking in by default, mind your link structure and internal anchors, don’t use Flash/JS for nav purposes, etc) but this blog post is turning out to be quite long enough already. And I want to save some goodies for my presentation at BarCamp Belfast.

So what are your web developer horror stories? Share them in the comments and we can all laugh at your pain. Schadenfreude and all that.

 SEO for Web Developers

Author: Barry Adams

Back in 1995 Barry Adams (@badams) famously predicted that the Internet was 'just a fad' and 'would amount to nothing'. He has come far since then. Starting out his career in the '90s in all things online as an intranet content manager, Barry has worked in a wide variety of positions, including corporate webmaster, in-house SEO specialist for a large regional newspaper, and web consultant for SMEs. More articles and bio from Barry Adams
Please share if you think others would benefit


Related posts:

  1. 5 Common Problems (and solutions) with Google Base
  2. Three .htaccess tips that can help your SEO
  3. Need for Speed – Enable HTTP Compression
  4. How to Share on Google+ from any website
  5. SES New York 2011: Duplicate Content & Multiple Site Issues

Want to keep informed on what goes on in the world of Search and Social and here on State of Search? Subscribe to our newsletter now!

Currently there are "5 comments" on this Article:

  1. Hi Barry,

    Enjoyed your blog post. I don’t have anything worthwhile to add, at least nothing that can make it from my head to my fingers. :)

    Best,

    Derrick

  2. Sebastian says:

    Nice piece Barry. Perhaps you can scrape a few items from my CMS shitlist. Have fun.

  3. Barry Adams says:

    That’s a handy shitlist Sebastian, thanks. :)

  4. Cracking metaphor to explain the 301/302 conundrum Barry, I’ll be writing that on a post-it and sticking it to our Dev’s desk.

    Or stapling it to his head. One of the two.

    Great post anyway, thanks very much.

  5. [...] content in that talk came from a blog post I did for State of Search about the same topic – SEO for Web Developers. Below are the slides: SEO for Web Developers Related Articles:Recent Writings on SEO 6Recent [...]

Comment on this Article:







State of Search

The fastest growing Search and Social blog covering strategy developments in search and social World Wide with an international perspective no other blog has!

This site is listed in:
The Adage Power 150
Top Rank Blog's Big List of Search Marketing Blogs
Ebuzzing Top Online Marketing Blogs
Findthebest Blogs

Find out more about us

Sign up for our newsletter



Sponsors

Manual Linkbuilding ___________________________________________________

Recent Comments

  • Sally: These are excellent tips. This is prob...
  • Daniel: Loved this post, I shared it with all ...
  • James Carson: Nice post. Thanks for the link :-). Th...
  • Jeff: There are social shopping sites, a sim...
  • Arne van Elk: Thanks guys, I guess I'll keep using i...

Upcoming Events

SES London 2012 ___________________________________________________
Thinkvisibility 2012 ___________________________________________________
Brighton SEO 2012 ___________________________________________________
SMX London 2012 ___________________________________________________
International Search Summit ___________________________________________________

Sponsors