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:
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:
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.]
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:
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.
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
Nice piece Barry. Perhaps you can scrape a few items from my CMS shitlist. Have fun.
That’s a handy shitlist Sebastian, thanks.
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.
[...] 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 [...]