http://petermahoney.net/search-engine-optimisation-seo-code/
Search Engine Optimisation (SEO): Code
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.
- 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. - 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. - 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. - 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. - Javascript at the bottom.
Place all the Javascript you can at the bottom of your page’s code. Again, it’s a speed thing. - 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.
I’m currently working on a site called …
I’m currently working on a site called, “Massage me anywhere”.
I hope it means geographically.
Show all images in a directory using PHP
This is a sweet script. It displays all the files in a particular directory. In this case it’s a folder full of user uploads, so it makes keeping an eye on things a breeze.
[sourcecode language=”php”]‘;}
?>[/sourcecode]
You can of course easily modify it to show only JPGs or other image types (if you’re pulling content from a directory of mixed file types) or to edit the echo so it returns images that link to user profiles etc.
But this is it’s most basic form.
Feeling righteously ill today Ugh
Feeling righteously ill today. Ugh.
Making work, work
When I first started working for myself I needed a confidence boost, and sitting in my office asking people if they needed help with anything wasn’t giving me it.
I had a tonne of offers for agency work, but I’m in this game to create my own business, not just support someone else’s. I’m happy to be a gun for hire, but I want to at least be protecting my own town.
A friend recommended PeoplePerHour, and at first I was somewhat sceptical because of other similar freelance sites I’d used (that all seemed very driven to support the buyer, making the seller feel like a turd begging for work) but got my first paying job on it within several hours. Then another. Then a third.
That was the confidence I needed. Next thing I knew I was taking on client’s from elsewhere, and could demonstrate my skills.
I came back though. I wanted to start 2013 with some fresh work, so you’ll find me selling my wares there again. It’s a creative space for people to meet and find common ground to work towards. ANd of course, there’s some really talented developers on there too.
If I do say so myself.
Why not hire me?
- « Previous Page
- 1
- …
- 48
- 49
- 50
- 51
- 52
- …
- 61
- Next Page »