Skip to main content
GoogleHints & TipsKeywordsSearch Engine Optimisation (SEO)ToolsWordpress

Search Engine Optimisation (SEO): Code

By March 4, 20132 Comments

Search Engine Optimisation (SEO): Code - Mahoney Web MarketingThere are a number of ways you want to improve your website’s code to help with SEO, and also to improve site speed which as I keep banging on about, is an important metric for Google.

This is probably the most technical of all the posts that make up my SEO primer, so by way of introduction, I’ll simply say the following are a variety of things within your site’s code that are helpful for optimisation. You may not be someone who ever touches your site’s code, but these are good things to know about so you can check your developer is doing their job right. 🙂

As much as I love spinning a good narrative, bullet points are going to be our friend in this piece.

  1. Meta tags.
    I’m getting these out of the way early, because they’re controversial. That’s because the way these are used is often misunderstood owing to historical changes. Basically, they used to be really important, and the first thing old-school search engines looked at. Then the spiders got more clever, and started to look to make sure your page’s text contained all the keywords you were using in the meta. Then they realised they could do away with the meta and just scan your text. For this reason, a lot of SEO (ahem) “experts” will tell you they’re not necessary. That’s bulls**t basically.
    This page
    documents Google’s use of the “description” tag, which they do look at and use. Other search engines use them in varying ways too. The description and keyword (and author!) tags are all worth using, and using well. Make sure they tie-in with your copy.
  2. Alt tags.
    Search engines are certainly getting better at seeing what your site’s images are, but it’s far from perfect. Alt tags are the things that let the browser know what your image is representing, and therefore really important for SEO. I always make sure that my images contain tags that say not only what the image is of, but also the name of the page/entry it’s appearing in. That way the page name is repeated in the code too, which boosts it’s importance within the page.
  3. nofollow.
    About 10 years ago, people had things called doorway pages that were nothing but links to other pages in their sites. It was a dirty trick and got stamped all over by the search engine gods. However, you know how WordPress in particular creates pages for monthly archives, category archives, even tag archives? Well funnily enough they look a lot to spiders like doorway pages, containing tonnes of links (including all the sidebar links) to pages that just link to other pages en masse. I’ve measured this myself, and yes, you will get penalised for them. I have most of my links on this site set up with the nofollow rule, meaning the good search engines (technically spiders don’t have to respect this rule, but the big boys all do) will not follow it and count it as a link.
    I want them to see all my pages, but not to see them all a hundred times. I opt to leave category links being followed, but NOT monthly archives or tags.
  4. minify.
    This is just a trick to get all the unnecessary spaces and characters out of your code. It’s particularly useful for javascript and CSS, but your output HTML is worth shrinking too. There are tools out there that do it at load time, but that can place a burden on your server. I love this tool which takes all your CSS and merges parts where it can, and will (if you ask it to) minify the hell out of it.
    If you keep the page load time down, Google will rank you up.
  5. Javascript at the bottom.
    Place all the Javascript you can at the bottom of your page’s code. Again, it’s a speed thing.
  6. Make it clean.
    Don’t use tables unless it’s for, you know, a table. CSS has reigned supreme for a long time now. Don’t repeat attributes within tags. Check for redundant code. Consider taking out all those comments you put in while you were coding the site in the first place. Basically, give your code a nice, long bath.

Technically, your code underpins everything. Make it Search Engine Optimisation friendly and you’ll be much better ranked for it.

Author Peter

More posts by Peter

Join the discussion 2 Comments

Leave a Reply

Exit mobile version