SEO Tips, Tricks and Techniques – Page Title Optimization

October 28, 2008

What is Page Title?
The page title (not to be confused with the heading for a page) is a string of text, defined by contents of the <TITLE> element in the <HEAD> section of the HTML document. It is extremely important that all Web pages (each of the pages on your Web site) have titles. Because the title is visible both in the title bar of a browser window, as well as the headline of a search engine result.

A simplified version might look like:

<HTML>
<HEAD>
<TITLE>Document Title Here</TITLE>
<META-NAME=“keywords” CONTENT=“keyword1, keyword2, keyword3”>
<META-NAME=“description” CONTENT=“200 character site description goes here”>
<META-NAME=“robots” CONTENT=“index, follow”>
</HEAD>
<HTML>

The title tag reflects the content on your page.


Importance of the <TITLE> tag:
Title tag information identifies and describes your pages. Titles tell readers where the information contained on a page originated. It functions as a sort of virtual business card for your pages. Search bots read the page titles and use the information to determine what the pages are about. Most Web browsers display a document’s title in the top line of the screen. When users print a page from your Web site, the title usually appears at the top of the page at the left. When someone bookmarks your site or adds it to their “Favorites,” the title appears as the description in his or her bookmark file. These are all reasons that it is important that a page’s title reflect an accurate description of the page.

More importantly, the title tag is typically what the target market sees in search results in some of the major search engines. A typical search result consists of the title tag as the link to the Web site, a brief description of the Web site, and the URL. Every page of your Web site should have a unique title tag and each title tag should accurately describe the page content. Your target market should be able to read the title tag and understand what the page they are about to view contains. It is arguably one of the most important factors in search engine optimization because it is both an important factor in search engine rankings, as well as a critical call to action that can enhance the click-through rate (CTR). If you have a keyword between your TITLE tags that competing pages don’t have, you have a good chance of getting at or near the top of the search results.

HTML page titles show up as the first line of clickable text in most search engine results.


Optimizing Page Title:
Keep your title tags brief – in the realm of five to ten words. The longer your title tag is, the more diluted your keywords become and the more likely your title tag is to be truncated by a search engine. To get your message across, you should include important keywords toward the beginning of the title and make sure that the first 40 to 60 or so characters of your title form a complete thought. Google displays a maximum of 66 characters. Yahoo! Search, on the other hand, permits up to 120 characters for a title tag. Presently Google and Yahoo! Search are the two most important search engines; use their requirements as an approximation when designing your title tag. My advice is to include your most important keyword phrases first, within Google’s 66-character range. Also keep in mind that people will see that title in the search results, and they’re more likely to click on a site that has a title that flows and is descriptive – not a list.

  1. Make sure the <TITLE> tag is the first element in the <HEAD> section of your page – this makes it easier to find by Google.
  2. Keep your title tags short. Although the World Wide Web Consortium (W3C) has suggested the lens of the page title to be less than 65 characters, some search engines will only include the first 40 or 50 characters (including spaces) of the page title. So, limiting the page title to 40 characters or less is a good SEO strategy.
  3. Each page should have a unique title.
  4. Spell check your title tags.
  5. Use the best form, plural or singular, for your keywords.
  6. Write titles using capitals, like the title of a book.
  7. Use a grammatically correct sentence as the title, rather than just a list of keywords.
  8. Always try to include the most relevant keyword(s) in the page title. Many engines place a high degree of relevancy on pages that mention a search keyword in the page title.
  9. You should not include your company name in the title unless your company name is so well known as to be a keyword. If you must include your company name in the title, put it at the end.
  10. Never leave your title tags blank. Having no Page Title on your page can make it practically impossible to find it in any search engine.
  11. Limit the number of two-letter words and very common words (known as stop words), such as as, the, and a, because the search engines ignore them.
  12. Always add keywords in title tags that reflect the content on your page and always use the most important keywords and leave out less important keywords.
  13. If you want, you can repeat the primary keywords once.
  14. Try to include your Primary Keyword Phrase in every title of every page.
  15. Begin the title of your home page with your Primary Keyword Phrase, followed by your best Secondary Keyword Phrases.
  16. Use more specific variations to your Primary Keyword Phrase on your specific product, service, or content pages.
  17. Avoid stuffing of keywords in the page title and also in the content. Search engines will definitely ban your site or will not include your webpage in their databases, as such stuffing is considered as keyword spamming.
  18. See what other people are doing.
  19. Always search Google for similar articles or tutorials. Then see what top ranking pages have done with their title tags. Do not copy their title tags, but you can come away with a few ideas that may help you write your title tags.
  20. Don’t be afraid to experiment with title tags and see what works best for your site and search engines. Writing good title tags takes time and will only help your site.

Search Engine Optimization – Basic Terms

October 27, 2008

Search Engine Optimization (SEO):
Search Engine Optimization refers to the collection of techniques and practices that allow a site to get more traffic from search engines (Google, Yahoo, Microsoft). This is the process of editing a web site’s content and code in order to improve visibility within one or more search engines. When this term is used to describe an individual, it stands for “Search Engine Optimizer” or one who performs SEO. It is common practice for Internet users to not click through pages and pages of search results, so where a site ranks in a search is essential for directing more traffic toward the site.


Search Engine Marketing (SEM):
Search Engine Marketing (SEM) is term that describes marketing a web site using various techniques to make it more visible on search engines. SEM techniques include search engine optimization (SEO), buying Pay Per Click (PPC) ads or using a combination of both of these options. Search Engine Marketing (SEM) is the best way of getting your products and services seen by people who want to buy them.


SEO Users:

  • Webmasters
  • Art directors
  • Graphic artists
  • Business owners
  • Teachers and students
  • Coders and programmers
  • Marketing and sales professionals
  • Aspiring SEO and SEM professionals

Goals of SEO:

  • Achieve high rankings on SERP’s (Search Engine Ranking page)
  • Ensue that website is easily accessible to potential customers
  • Making a search engine friendly webpage
  • Getting searchers to click on your listing and not on your competitors website
  • Optimize websites by ethical means only

Keyword Research:
Keyword research is the process of determining what keywords are used in search engines by potential customers. It enables site owners to choose keywords when constructing and optimizing a website (page). Keyword research is also extensively used to manage PPC advertising campaigns or if you are looking to research and identify profitable niche markets.

Keyword research consists of at least three major steps:

  1. Discovery – finding as many keywords as possible relating to your web site. Online tools exist to speed up the discovery process by allowing marketers to search for related keywords and their relative search popularity.
  2. ROI Analysis – finding the most valuable keywords for your web site. The most generic keywords are the most widely searched, but also the most competitive, and sometimes bring mediocre conversion rates. Generally, phrases that most accurately describe specific qualities of a site yield the highest ROI.
  3. Competitive Analysis – analyzing the strength of competitors for potential keywords. Competitive factors include how attentive sites are to optimization issues and the number of relevant inbound links they have received.

Google offers a Keyword research tool for free.


Goals of Keyword Research:

  • Identify the broadest possible set of keywords used by potential customers.
  • Determine which keywords are most popular and thus represent the primary targets for SEO and keyword advertising.
  • Identify keywords whose search engine ranking is realistically obtainable by SEO.
  • Determine what negative keywords will make keyword advertising most cost effective.
  • Identify customer language that can influence branding and messaging.
  • Develop additional content based upon user terminology.

PageRank (PR):
PageRank is Google’s ranking software that calculates the relevance of a webpage to the search keywords entered. The software analyses both the number of incoming links and the ‘quality’ of the referring webpage to generate a relative measurement between 0 (low-relevance) and 10 (high-relevance). The ‘quality’ of the referring webpage is an abstract measure of how authoritative it is on the subject matter. It provides a rough estimate of the overall importance of a web page. PageRank is the heart of Google’s algorithm and makes it the most complex of all the search engines. The name PageRank™ is a trademark of Google.


On Page Optimization:
In terms of search engine rankings, on page optimization refers to changes made to your physical website which are designed to promote improvements in ranking. This includes but is not limited to HTML tags, content – including proper paragraph structure, page layout and hierarchy. Even the efficiency of page code and loading time of your website, and the way you link between pages (often called internal linking) can impact the relevancy that the search engines place on your documents. On page optimization techniques involve optimization of web pages on your website. It involves adding keywords, meta-tag and descriptions, site maps and resource section to all the web pages. A website is designed to navigate and be search engine friendly.


On Page Optimization Techniques:

  • Title Optimization: This should be the first tag in the Head section of the page. There is evidence that search engines give more weight to factors higher up the page.
  • Meta Tag Optimization: Both Google, Yahoo! and MSN Search will use the text they find on the page as a description so make sure your first header and sentence describe the contents.
  • Content Optimization: The content should be properly structured with the use of Heading (H1, H2, H3 etc) tags bold containing relevant keywords. Search-engines will only index a limited amount of text in HTML tags and using too many keywords will dilute the focus.
  • Image Optimization: Some major search engine did not recognize images. Image alternate-text tags (ALT tags) are only indexed where the image is part of a hyperlink. However ALT tags are useful for non-graphical browsing and should be in use correctly.
  • Keyword Density Optimization: Keyword density means the ratio of the number of occurrences of a particular keyword or phrase to the total number of words in a page. 3%-5% keyword density is fine for major search engines but more than 10 % keyword density treated as keyword stuffing or keyword spanning by the search engines.
  • URL Rewritings: In dynamic website URL`s contain a lot of special character (E.g. @, #, $, % and more…) that is not recognize/supported by the search engine. In that case rewrite search engine friendly URL.
  • Link Structure Modification: Create anchor text to related internal pages. Keep the number of links to fewer than 50, and probably less and don’t repeat identical outbound-links. Theme related pages should be at the same level in the site hierarchy and be linked through the site’s menu structure and site map.

Off Page Optimization:
Off-page optimization techniques involve placing your website’s links on other websites. Few websites offer one way links while others ask for link exchange or three way links. Back links are generated using various off page optimization techniques such as search engine submission methods and link exchange methods. Search engine submission methods involve submitting blogs, articles and links to various websites. The other method involves exchanging links or sharing hyper-links with other websites having relevant information or services. Off page optimization methods are used to attain and retain top positions. It is noteworthy that on page optimization is useful only if off page optimization for websites can drive some traffic to your website. It is generally agreed that the links that point to a website are one of the most powerful way of climbing Search Engines results pages. For why off page optimization brings traffic meant for your website.

The best inbound links have three main qualities to them:

  1. They are from higher ranked sites than your own
  2. They are relevant to the topic you are writing about
  3. They link to you using relevant keywords to your page

Off Page Optimization Factors:

  • Directory Submission
  • Reciprocal Link Building
  • One way Link Building
  • Article Submission
  • Press Release
  • Bookmarking
  • Blog Submission
  • Participate in Forums
  • Build a Blog

Optimize your PHP Code – Tips, Tricks and Techniques

October 24, 2008
  1. If a method can be static, declare it static. Speed improvement is by a factor of 4
  2. echo is better than print

    echo( ‘PLAY with PROBLEMS’ );

    // is better than

    print( ‘PLAY with PROBLEMS’ );

  3. Use echo’s multiple parameters instead of string concatenation

    echo ‘PLAY’ . ‘WITH’ . ‘PROBLEMS’;

    // is better than

    echo ‘PLAY’, ‘WITH’, ‘PROBLEMS’;

  4. Surrounding your string by instead of will make things interpret a little faster since PHP looks for variables inside “…” but not inside ‘…’. Of course you can only do this when you don’t need to have variables in the string.

    echo 'a string ' . $name;

    // is better than

    echo "a string $name";

  5. Use functions outside of loop. Otherwise function gets called each time.

    $max = count( $array );

    for( $i = 0; $i < $max; $i++ )
    {
    // do something
    }

    // is better than

    for( $i = 0; $i < count( $array ); $i++ )
    {
    // do something
    }

  6. Unset your variables to free memory, especially large arrays.
  7. Avoid magic functions like __get, __set, __autoload
  8. require_once() is expensive
  9. Use full paths in includes and requires, less time spent on resolving the OS paths.

    include( '/var/www/html/your_app/test.php' );

    //is better than

    include( 'test.php' );

  10. If you need to find out the time when the script started executing, $_SERVER['REQUEST_TIME'] is preferred to time()
  11. See if you can use strncasecmp, strpbrk and stripos instead of regex
  12. str_replace is better than preg_replace, but strtr is better than str_replace by a factor of 4
  13. If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one line of code that accepts arrays as search and replace arguments.
  14. It’s better to use select statements than multi if, else if statements.

    switch( $name )
    {
    case ‘saiful’:
    // do something
    break;

    case ‘ekram’:
    // do something
    break;

    case ‘arif’:
    // do something
    break;

    default:
    // do something
    break;
    }

    // is better than

    if( $name == ‘saiful’ )
    {
    // do something
    }
    else if( $name == ‘ekram’ )
    {
    // do something
    }
    else if( $name == ‘arif’ )
    {
    // do something
    }
    else
    {
    // do something
    }

  15. Error suppression with @ is very slow.

    $name = isset( $id ) : ‘saiful’ : NULL;

    //is better than

    $name = @‘saiful’;

  16. $row['id'] is 7 times faster than $row[id]
  17. Error messages are expensive
  18. Close your database connections when you’re done with them
  19. Incrementing a local variable in a method is the fastest. Nearly the same as calling a local variable in a function.
  20. Incrementing a global variable is 2 times slower than a local variable.
  21. Incrementing an object property (eg. $this->prop++) is 3 times slower than a local variable.
  22. Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one.
  23. Just declaring a global variable without using it in a function also slows things down(by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists.
  24. Methods in derived classes run faster than ones defined in the base class.
  25. A function call with one parameter and an empty function body takes about the same time as doing 7-8 $localvar++ operations. A similar method call is of course about 15 $localvar++ operations.
  26. A PHP script will be served at least 2-10 times slower than a static HTML page by Apache. Try to use more static HTML pages and fewer scripts.
  27. Your PHP scripts are recompiled every time unless the scripts are cached. Install a PHP caching product to typically increase performance by 25-100% by removing compile times. OP code caches are useful so that your script does not have to be compiled on every request
  28. When working with strings and you need to check that the string is either of a certain length you’d understandably would want to use the strlen() function. This function is pretty quick since it’s operation does not perform any calculation but merely return the already known length of a string available in the zval structure (internal C struct used to store variables in PHP). However because strlen() is a function it is still somewhat slow because the function call requires several operations such as lowercase & hashtable lookup followed by the execution of said function. In some instance you can improve the speed of your code by using an isset() trick.

    if( strlen( $name ) < 5 )
    {
    echo "Name is too short";
    }

    // is better than

    if( !isset( $name{5} ) )
    {
    echo "Name is too short";
    }

  29. When incrementing or decrementing the value of the variable $i++ happens to be a tad slower then ++$i. This is something PHP specific and does not apply to other languages, so don’t go modifying your C or Java code thinking it’ll suddenly become faster, it won’t. ++$i happens to be faster in PHP because instead of 4 opcodes used for $i++ you only need 3. Post incrementation actually causes in the creation of a temporary var that is then incremented. While pre-incrementation increases the original value directly. This is one of the optimization that opcode optimized like Zend’s PHP optimizer. It is a still a good idea to keep in mind since not all opcode optimizers perform this optimization and there are plenty of ISPs and servers running without an opcode optimizer.
  30. Not everything has to be OOP, often it is too much overhead, each method and object call consumes a lot of memory.
  31. Do not implement every data structure as a class, arrays are useful, too
  32. Don’t split methods too much, think, which code you will really re-use
  33. Make use of the countless predefined functions
  34. If you have very time consuming functions in your code, consider writing them as C extensions
  35. Profile your code. A profiler shows you, which parts of your code consumes how many time.
  36. mod_gzip which is available as an Apache module compresses your data on the fly and can reduce the data to transfer up to 80%
  37. Use <?php … ?> tags when declaring PHP as all other styles are depreciated, including short tags.
  38. Never trust variables coming from users (such as from $_POST) use mysql_real_escape_string when using MySQL, and htmlspecialchars when outputting as HTML

    //a safe query
    $_user = mysql_real_escape_string( $user );
    $_password = mysql_real_escape_string( md5( $password ) );

    $query = sprintf( "SELECT * FROM user_info WHERE user='%s' AND
    password='%s'", $_user, $_password ); //safe output echo htmlspecialchars( "<a
    href='test'>Test</a>", ENT_QUOTES );

    //output: <a href='test'>Test</a>

  39. Avoid using plain text when storing and evaluating passwords. Instead use a hash, such as an md5 hash.

    $user_input = 'myPassword';

    if( md5( $user_input ) == $md5_password_from_database )
    {
    //login here...
    }

  40. Avoid the PHP mail() function header injection issue.
  41. Unset your database variables (the password at a minimum), you shouldn’t need it after you make the database connection.
  42. Use sprintf instead of variables contained in double quotes, it’s about 10x faster.
  43.  

Helpful Resources & References: