Did some research on SEO today, so here are the points. Most are kinda common sense, but some are new to me.
Analyze your keywords
Think about which keywords describe your products/services.
Use keywords tools, like Adwords keywords tool, or WordTracker. This will give you a list of most searched keywords related to your search term. These are keywords you want to use on your site.
Avoid using text (esp. headers) embedded in images - robots don't do OCR. Flash or PDF are a bit better.. but are far from pure html. If you need to use specific fonts - use cufon and the likes, those don't affect SEO.
Avoid frames - they will be orphaned in search results, that is the framed page will be displayed on its own, without the parent page.
Links and URLs
Use descriptive names in URL. Instead of /news.html a better choice would be /my-product-news.html. Same with urls with queries like /product.aspx?id=222 - a /my-product.aspx would be a lot better.
Keywords in links carry a pretty high weight - use them wisely.
Use dashes to separate words instead of underscores (recommended by Google).
Use keywords in links. Instead of "To find more information about my product click here", its better to use "Find more information about my product here".
Create links to your site. Write articles about your site or product, ask your friends or collegaues to create a link to your site, put your site address in your signature on forums, and so on.
Site
Don't create a hierachies too deep - 2-3 levels at most.
Add a 301 redirect from yoursite.com to www.yoursite.com - this way robots will know that these are same sites.
Camel-case your site name - makes little difference for robots, but are easier to read in search result (conversion!).
Title tag
Is used to create a link in search results. So it should contain keywords specific to the page (not just the company name!). It shouldn't be longer than about 60 characters - longer ones will be truncated in search results.
The words at the beginning of the tag will weight more - so putting keywords at the beginning makes more sense. Use title case, and throw out the words that don't convey the actual information (conversion!)
Meta tags
Description is important. This will be used to provide a text in search results (the text below the link). The text in description carries very little weight towards the ranking, but this is what a user sees (conversion!).
About 120 characters are displayed on search results page.
Keywords
are not used by search engine. They were abused so much, that search engines don't pay attention to them anymore.
Other
Avoid using JavaScript to generate the navigation - robots don't run the JS, so they won't be able to pick up your navigation, and can miss pages. Same with flash. If you have to use JS or Flash - add a link blocks to other pages
at the bottom of the page, or create a site map. Actually, probably a good idea regardless.
H tags carry more weight than span, so make a good use of H1(H2, H3) for keywords. Google does pay attention to the markup, so make your keywords standout - bold them, italicize them..
Use keywords in image alt tags. Use keywords in image file names (e.g. my-product.jpg).
If you're providing local services, you can use geo tags in meta tags. Put your address on pages, including your postal code/zip. Add your business information to local directories of search engines (www.google.com/places, www.bing.com/businessportal, listings.local.yahoo.com). Add as much text with keywords as possible, add images and videos.
You can use ubl.org to submit your listing to a bunch of directories.
Create an XML site map - those are read by search engines, and help them to navigate the site. Many CMS systems have this functionality built-in, or just google for xml sitemap generator. Generated map can be submitted to Google and Bing.
Quick notes
.NET, JS, and whatever else I'm working with.
Search This Blog
Monday, January 9, 2012
Friday, January 6, 2012
Foreach loop - eligible types
Apparently, the types are not required to implement IEnumerable to be iterated over with foreach loop - they just required to have GetEnumerator() method.
class EnumerableItem
{
}
class EnumerableItemsCollection // : IEnumerable<EnumerableItem>
{
public IEnumerator<EnumerableItem> GetEnumerator()
{
return null;
}
public static void Test()
{
foreach (var item in new EnumerableItemsCollection())
{
}
}
}
The code above compiles just fine.
My first thought was it works using Reflection.. Well, it's not, there are some hooks in a language itself for this construct. Btw, foreach loop is a bit faster than for loop (not by much, and they're both very fast.. don't switch for loops to foreach to speed up your code :)).
Tuesday, January 3, 2012
Better folder browser dialog in WinForms
The FolderBrowserDialog provided by .NET is just plain bad, the one that comes standard with Vista/7 is so much better..
So, download Windows API Code Pack, and then
using Microsoft.WindowsAPICodePack.Dialogs;
and
using (Microsoft.WindowsAPICodePack.Dialogs.CommonOpenFileDialog folderDialog = new Microsoft.WindowsAPICodePack.Dialogs.CommonOpenFileDialog())
{
folderDialog.IsFolderPicker = true;
if (folderDialog.ShowDialog() == CommonFileDialogResult.Ok)
{
string folder = folderDialog.FileName;
}
}
This will give you a dialog like this:

Wednesday, November 2, 2011
Right click menu jQuery plugin
Wrote a new plugin that creates a menu on a right-click, just aded it to jquery site.
Checked out a few similar plugins out there, and didn't like them too much - some are too complex to configure, some didn't look the way I wanted. I wanted something compact and simple, so wrote my own. Good exercise too.
Link to the project.
Sunday, October 30, 2011
jQuery selectors should be strings
Spent a good amount of time today trying to figure out why the jQuery's toggle works on first element, but doesn't work on the following ones.
I had this code:
function ToggleComment(id) {
$("#comments[data-id=" + id + "]").toggle({ "effect": "clip", "speed": "1000" });
}
and a few divs with id #comments-x.
It would toggle the first div, but not the subsequent ones.
This is the fix:
$("#comments[data-id='" + id + "']").toggle({ "effect": "clip", "speed": "1000" });
Note the '' around the id.
I had this code:
function ToggleComment(id) {
$("#comments[data-id=" + id + "]").toggle({ "effect": "clip", "speed": "1000" });
}
and a few divs with id #comments-x.
It would toggle the first div, but not the subsequent ones.
This is the fix:
$("#comments[data-id='" + id + "']").toggle({ "effect": "clip", "speed": "1000" });
Note the '' around the id.
Wednesday, May 26, 2010
How to login to Ubuntu instance on EC2 using Putty.
Once you've created Ubuntu instance (I've used ubuntu-9.04-jaunty-base-64 image), it's not really trivial to login. Below are the steps.
1. You have probably already created key pair on Amazon. If you didn't - go to Amazon AWS management console, (https://console.aws.amazon.com/ec2/home), and create a new key pair.
2. Putty doesn't accept this key as it is, it needs to be converted to a format useable by Putty. Using PuttyGen (puttygen.exe), do this:
Conversions -> Import key -> import key you've got from amazon (pem file) -> Save private key.
3. Open Putty, in host name enter public DNS name for the Ubuntu instance.
3.1. Go to SSH -> Auth, and choose key you've created in "Private key file for authentication" field. Click Open.
4. In "login as" prompt enter "root".
Done.
1. You have probably already created key pair on Amazon. If you didn't - go to Amazon AWS management console, (https://console.aws.amazon.com/ec2/home), and create a new key pair.
2. Putty doesn't accept this key as it is, it needs to be converted to a format useable by Putty. Using PuttyGen (puttygen.exe), do this:
Conversions -> Import key -> import key you've got from amazon (pem file) -> Save private key.
3. Open Putty, in host name enter public DNS name for the Ubuntu instance.
3.1. Go to SSH -> Auth, and choose key you've created in "Private key file for authentication" field. Click Open.
4. In "login as" prompt enter "root".
Done.
Thursday, May 20, 2010
How to view running queries in Sql Server
To see which queries are currently executing on a server, you can use this query:
SELECT sqltext.TEXT,
req.session_id,
req.status,
req.command,
req.cpu_time,
req.total_elapsed_time /1000 as 'Elapsed time, seconds',
req.total_elapsed_time /1000 / 60 as 'Elapsed time, minutes'
FROM sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext;
Query can be killed using this command:
kill session_id
Something tells me it's not a great idea to use it, though.. need to read more on it.
Taken from Sql Authority site
SELECT sqltext.TEXT,
req.session_id,
req.status,
req.command,
req.cpu_time,
req.total_elapsed_time /1000 as 'Elapsed time, seconds',
req.total_elapsed_time /1000 / 60 as 'Elapsed time, minutes'
FROM sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext;
Query can be killed using this command:
kill session_id
Something tells me it's not a great idea to use it, though.. need to read more on it.
Taken from Sql Authority site
Subscribe to:
Posts (Atom)