Make rel=publisher Passed W3 Validator

rel=publisher is a HTML piece that makes Google recognize (by rich snippet parser) the publisher of current page in search result. Unfortunately, the common implementation of rel=publisher by <link> tag is not validated by W3 Validator. Although W3 validator is just a guide and we don’t have to follow 100%, but we should if we can. This post shows a simple solution to make rel=publisher become valid.

Continue reading → Make rel=publisher Passed W3 Validator

Better way to display title meta tag

To display title meta tag in WordPress, we can use wp_title function. But it’s not enough if you want your theme SEO friendly. In TwentyTen, TwentyEleven and Underscores (_s) themes, WordPress team has tried to solve the SEO issue by using the following code:

<title>< ?php
/*
 * Print the <title> tag based on what is being viewed.
 */
global $page, $paged;

wp_title( '|', true, 'right' );

// Add the blog name.
bloginfo( 'name' );

// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
    echo " | $site_description";

// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
    echo ' | ' . sprintf( __( 'Page %s', '_s' ), max( $paged, $page ) );

?></title>

What it does is formatting the title tag as:

  • For homepage or front page: Site name – Site description
  • For other pages: Page title – Site name (and maybe) – Paged

It’s ok if we just accept it. But when we go into the code, we’ll see it’s not very good:

Continue reading → Better way to display title meta tag

WordPress: Automatically Remove Short Words In URL For Better SEO

WordPress: Automatically Remove Short Words In URL For Better SEO

According to Matt Cutts’s answer in his interview at Pubcon, for good SEO, the URL should contains 3-5 words. If there are more than 5 words, Google’s algorithms typically will just weight those words less and just not give you as much credit. So, we should keep our URL as short as possible, and remove all unwanted words.

Continue reading → WordPress: Automatically Remove Short Words In URL For Better SEO

How To Add Canonical Link In Blogger

How To Add Canonical Link In Blogger

Canonical link is a link tag in the header of HTML document that tells search engines the preferred location of this url. Canonical link is an useful instruction for search engines to deal with duplicate content problems. If your site has identical or vastly similar content that’s accessible through multiple URLs, this format provides you with more control over the URL returned in search results. It also helps to make sure that properties such as link popularity are consolidated to your preferred version.

Continue reading → How To Add Canonical Link In Blogger

Auto generate meta description without plugins in WordPress

Meta description is an important factor for Search Engine Optimization (SEO). Search engines use it for display snippet in the search results. Via meta description, visitors can see a brief and concise summary of your page’s content. In WordPress, if you use SEO plugins like All-In-One SEO, it already has the built-in feature for auto generation meta description tag. But you can do it yourself without any plugins, and here it is!

Continue reading → Auto generate meta description without plugins in WordPress