Learn SEO basics

Search engine optimization (SEO) is the process of improving the volume and quality of traffic to a web site from search engines via “natural” (“organic” or “algorithmic”) search results for targeted keywords. In this article find out how to do basic SEO, code search engine friendly pages and how to do a basic promotion of your site.

For this I will use one of sites I’ve made, it is AdSense site and it follows SEO rules and it is good example what to do and what not to do. This site is https://suhasrathod.wordpress.com so let’s start from the top.

Things to do

  • Keywords in URL
    For example https://suhasrathod.wordpress.com use whole words – keywords to best describe your site. Don’t rely on this if you don’t have keywords in other parts of your site.
  • Keywords in <title> tag
    This shows search results as your page title, so this is one of the most important things and it shouldn’t be long 5-6 words max, and use keyword at the beginning.
  • Keywords in anchor texts
    Also very important, especially for the anchor text, because if you have the keyword in the anchor text in a link from another site, this is regarded as getting a vote from this site not only about your site in general, but about the keyword in particular.
  • Keywords in headings (<H1>, <H2>, etc. tags)
    One more place where keywords count a lot. But beware that your page has actual text about the particular keyword.
  • Keywords in the beginning of a document
    While coding your page put your main content before side bar. Because this also counts, though not as much as anchor text, title tag or headings
  • Keywords in <alt> tags
    Spiders don’t read images but they do read their textual descriptions in the <alt> tag, so if you have images on your page, fill in the <alt> tag with some keywords about them.
  • Anchor text of inbound links
    This is one of the most important factors for good rankings. It is best if you have a keyword in the anchor text but even if you don’t, it is still OK.
  • Origin of inbound links
    It is important if the site that links to you is a reputable one or not. Generally sites with greater Google PR are considered reputable and the .edu and .gov sites are the most reputable
  • Links from similar sites
    Having links from similar sites is very, very useful. It indicates that the competition is voting for you and you are popular within your topical community.
  • Metatags
    Metatags are becoming less and less important but if there are metatags that still matter, these are the <description> and <keywords> ones.
  • Unique content
    Having more content (relevant content, which is different from the content on other sites both in wording and topics) is a real boost for your site’s rankings.
  • Frequency of content change
    Frequent changes are favored. It is great when you constantly add new content but it is not so great when you only make small updates to existing content.
  • Site Accessibility
    Another fundamental issue, which that is often neglected. If the site (or separate pages) is unaccessible because of broken links, 404 errors, password-protected areas and other similar reasons, then the site simply can’t be indexed.
  • Sitemap
    It is great to have a complete and up-to-date sitemap, spiders love it, no matter if it is a plain old HTML sitemap or the special Google sitemap format.

Things not to do

  • Keyword stuffing
    Any artificially inflated keyword density (10% and over) is keyword stuffing and you risk getting banned from search engines.
  • Keyword dilution
    When you are optimizing for an excessive amount of keywords, especially unrelated ones, this will affect the performance of all your keywords and even the major ones will be lost (diluted) in the text.
  • Single pixel links
    when you have a link that is a pixel or so wide it is invisible for humans, so nobody will click on it and it is obvious that this link is an attempt to manipulate search engines.
  • Cross-linking
    Crosslinking occurs when site A links to site B, site B links to site C and site C links back to site A
  • Duplicate content
    When you have the same content on several pages on the site, this will not make your site look larger because the duplicate content penalty kicks in. To a lesser degree duplicate content applies to pages that reside on other sites but obviously these cases are not always banned
  • Doorway pages
    Creating pages that aim to trick spiders that your site is a highly-relevant one when it is not, is another way to get the kick from search engines.
  • Cloaking
    Cloaking is another illegal technique, which partially involves content separation because spiders see one page (highly-optimized, of course), and everybody else is presented with another version of the same page.
  • Invisible text
    This is a black hat SEO practice and when spiders discover that you have text specially for them but not for humans, don’t be surprised by the penalty.
  • Illegal Content
    Using other people’s copyrighted content without their permission or using content that promotes legal violations can get you kicked out of search engines.
  • Flash
    Spiders don’t index the content of Flash movies, so if you use Flash on your site, don’t forget to give it an alternative textual description. And also don’t have just flash home page without HTML one.
  • Frames
    Frames are very bad for SEO. Avoid using them unless really necessary.
  • Redirects (301 and 302)
    When not applied properly, redirects can hurt a lot – the target page might not open, or worse – a redirect can be regarded as a black hat technique, when the visitor is immediately taken to a different page.
  • Bans in robots.txt
    If indexing of a considerable portion of the site is banned, this is likely to affect the nonbanned part as well because spiders will come less frequently to a “noindex” site.
  • Session IDs
    This is even worse than dynamic URLs. Don’t use session IDs for information that you’d like to be indexed by spiders.

Submit your site

Advertisements

Six things that dissenters don’t know about WordPress

Here are the six things that dissenters don’t know about WordPress:
1. WordPress is Incredibly Scaleable
There is a misconception that WordPress can only handle small sites because it was built as a blogging tool. If you need a large site with a lot of content WordPress will choke and die. Not true, sites like SmashingMagazine and TechCrunch have hundreds of thousands of pages of content and still run lightening fast. WordPress can be run on multiple servers if needed or integrated with a content delivery network if you have high amounts of traffic or a particularly large website.

Additionally WordPress.com, the hosted version of WordPress has over 20 million blogs running on a version of WordPress (using the multisite mode). If that doesn’t demonstrate scalability I don’t know what would.

2. WordPress is NOT Just Posts and Pages
While WordPress originated as a simple blogging platform that only had posts and pages, it has come along way with custom content types. Drupal has always been strong in this area, with the CCK (Custom Content Kit) allowing the creation of flexible data models and have now integrated that capability into the Drupal core. Unbeknownst to most Drupal developers, WordPress also has this capability built into the core (since version 3.0).

The custom post type gives developers the abilities to create content types that have have their own data structure that doesn’t need any resemblance to  posts or pages. This content can be displayed anyway you wish and can be dissected, mashed up and output if you so desire. Additionally, with plugins like Magic Fields, Custom Post Type UI, PODS and Advanced Custom Fields this can all be done from the WordPress backend. Along with custom taxonomies content can take any shape, can be sorted, classified and output anyway you need it.

3. WordPress is NOT Just for Simple Sites
Many people gravitate towards Drupal because they think that it has more capabilities than WordPress. WordPress is thought of a “simple CMS for simple websites.” In reality, WordPress is extremely extendable. In fact I have yet to come across a project that you outright couldn’t do in WordPress (not that it is the best fit for all projects, just that it would be technically possible.) In fact here are some capabilities WordPress can easily accomplish:

  • Facebook clone
  • Forums
  • Digg Clone
  • Newsletter
  • Wiki
  • Customer Relationship Management System
  • Twitter clone
  • Invoicing system
  • Project management system
  • Calendar system
  • E-commerce website
  • Job board
  • Classified board
  • Real estate listing site
  • Business directory
  • Auctions website
  • Review website

And that isn’t even all of them. With custom post types you could conceivably do just about anything.

4. WordPress Has Great User Management
I have no problem admitting that Drupal has really powerful user management capabilities. Drupal was originally a community based platform that has evolved into a CMS “Framework,” so much of the user management capabilities have been left in the core. That being said, WordPress can have extremely powerful user management if you need it. I would say that the average website doesn’t need complex user management capabilities, for most businesses you only have one or two people maintaining the website. If you do need more power there are plugins like User Permissions, User Access Manager or User Role Editor that can give you that functionality.

Those plugins allow you to create groups, restrict group capabilities on a detail level (including editing, adding or modifying plugins, etc…) restrict page editing to specific groups, etc… Pretty much anything you would need with a community based site.

5. WordPress Can Address Your Workflow Needs
It is likely that new web content will need to be approved before it goes live. This is described as workflow and it is the process of how the content must be created, reviewed and published. By default WordPress has a few ways to manage this, including private pages (you must be logged in to see), password protected pages and draft pages. If you need a more sophisticated system you can use Edit Flow, Zensor, User Submitted Posts, Peter’s Collaboration E-mails or Peter’s Post Notes to add the functionality you need.

6. WordPress Can Rock E-Commerce
In my presentation I made the mistake of saying that at some point you should use a full fledged E-Commerce system rather than WordPress. While I still believe that hard core e-commerce sites should run on an e-commerce specific platform, it did make WordPress sound like an poor candidate for selling items online. Through a handful of great e-commerce plugins, you can use WordPress to sell products online including the following features:

  • Real products
  • Digital / downloadable products
  • Tickets / event registration
  • Subscription / site access services
  • Real time shipping integration
  • Payment gateway integration
  • Product variations (colors, sizes, types, costs, etc…)
  • Quickbooks integration
  • Affiliate management
  • Custom fields / product types
  • Pricing levels
  • Wish lists
  • Recommend products
  • Discount codes
  • Stock management
  • Import / export capabilities

These capabilities exist in the plugins or through already available plugin extensions. No custom development is required.

Additionally WordPress has been able to integrate with outside e-commerce systems like Magento, ZenCart and OS Commerce since as early as 2008.

PHP date formats

DAYS
d – day of the month 2 digits (01-31)
j – day of the month (1-31)
D – 3 letter day (Mon – Sun)
l – full name of day (Monday – Sunday)
N – 1=Monday, 2=Tuesday, etc (1-7)
S – suffix for date (st, nd, rd)
w – 0=Sunday, 1=Monday (0-6)
z – day of the year (1=365)

WEEK
W – week of the year (1-52)

MONTH
F – Full name of month (January – December)
m – 2 digit month number (01-12)
n – month number (1-12)
M – 3 letter month (Jan – Dec)
t – Days in the month (28-31)

YEAR
L – leap year (0 no, 1 yes)
o – ISO-8601 year number (Ex. 1979, 2006)
Y – four digit year (Ex. 1979, 2006)
y – two digit year (Ex. 79, 06)

TIME
a – am or pm
A – AM or PM
B – Swatch Internet time (000 – 999)
g – 12 hour (1-12)
G – 24 hour c (0-23)
h – 2 digit 12 hour (01-12)
H – 2 digit 24 hour (00-23)
i – 2 digit minutes (00-59)
s 0 2 digit seconds (00-59)

OTHER e – timezone (Ex: GMT, CST)
I – daylight savings (1=yes, 0=no)
O – offset GMT (Ex: 0200)
Z – offset in seconds (-43200 – 43200)
r – full RFC 2822 formatted date

Difference between 2 dates in days, minutes and seconds

function dateDifference($date1, $date2)
{
$date1=strtotime($date1);
$date2=strtotime($date2);
$diff = abs($date1 – $date2);
$day = $diff/(60*60*24); // in day
$dayFix = floor($day);
$dayPen = $day – $dayFix;
if($dayPen > 0)
{
$hour = $dayPen*(24); // in hour (1 day = 24 hour)
$hourFix = floor($hour);
$hourPen = $hour – $hourFix;
if($hourPen > 0)
{
$min = $hourPen*(60); // in hour (1 hour = 60 min)
$minFix = floor($min);
$minPen = $min – $minFix;
if($minPen > 0)
{
$sec = $minPen*(60); // in sec (1 min = 60 sec)
$secFix = floor($sec);
}
}
}
$str = “”;
if($dayFix > 0)
$str.= $dayFix.” day “;
if($hourFix > 0)
$str.= $hourFix.” hour “;
if($minFix > 0)
$str.= $minFix.” min “;
if($secFix > 0)
$str.= $secFix.” sec “;
return $str;
}
echo ‘<br>Difference is : ‘.dateDifference(“2011-09-18 10:00:00”, date(‘Y-m-d H:i:s’));