Wordpress SEO Expert

Improve your Google ranking with 24-year experienced SEO professional Peter Mahoney

  • SEO Overhaul
  • SEO Campaign
  • WP Support
  • Blog
    • SEO Emails
  • Praise

Search Engine Optimisation (SEO): Code

March 4, 2013 by Peter Mahoney

Search Engine Optimisation (SEO): Code Wordpress SEO ExpertThere 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.

Filed Under: Google, Hints & Tips, Keywords, Search Engine Optimisation (SEO), Tools, Wordpress

Get FREE Wordpress SEO tips!

I send regular newsletters with WordPress SEO expert-level tips. Sign up to get them, along with my FREE e-book “Ongoing SEO Success”.

Did I mention they’re free!

Subscribe for free

Praise

I have over 2,500 5-star feedback reviews (and I’ve never received less than the full five.)

Here’s just one example, from Mike who runs Costello Entertainments:

Migration, Hosting, SEO and Speed Work on our new website all completed quickly and efficiently and Peter was most helpful in fixing an issue with a Popover on the site as well. If you’re thinking about asking Peter to do a job for you or hesitating, JUST DO IT! – He knows programming and the internet inside out, he’ll get the job done for you professionally, with a smile. I wish I could call a plumber or a tradesman to do the jobs I can’t do myself with the same level of confidence.
Read a lot more.

Recent Blogs

  • Thanks WordPress SEO expert for all your work.
    I feel like you are my guy for all my SEO. I did want to ask you if I need to get someone to write my Blog ...
  • Can the description show the Product Short Description
    Hi Peter SEO Expert :), Hope you’re doing well and having a good summer. Had this message from a client ...
  • Don’t just search for yourself!
    This is actually a stock answer I send people pretty often. I’m regularly asked about the difference ...
  • SEO doesn’t shouldn’t your site’s front-end
    On my SEO Emails section (where I share helpful responses to commonly asked queries) I recently shared a not ...

Legal

  • Terms and conditions
  • Privacy policy
  • Disclaimer

Also read

  • Payment information

RSS

Peter Mahoney, WordPress SEO expert blog

Recent Posts

  • Thanks WordPress SEO expert for all your work.
  • Can the description show the Product Short Description
  • Don’t just search for yourself!
  • SEO doesn’t shouldn’t your site’s front-end
  • Cumulative Layout Shift (CLS) for SEO & Speed

© Copyright 2023 Wordpress SEO Expert · All Rights Reserved · Site by Peter Mahoney