Content is King

Just in case you haven’t heard. If you want your website to succeed online, Content is King. Search engines rank you based on originality. Adsense will display advertisements based on your content. And users will stick with you as long as you provide interesting, relevant and original content.

So don’t try to find a shortcut and copy and paste the data from other sites (especially not from Wikipedia). Write/create new content yourself that people will love.

Choosing the type of content is another thing you have to keep in mind. Certain topics are searched more and also provide better returns in terms of advertisements. Others may be interesting to you, but not to your would-be readers.

One way is to find the most searched terms and base your content around that.

Looking at Google’s Hot Trends page, you can see that Steve Perry and other terms related to entertainment are the most searched items at the moment. You might want to write about that.

In the long run however, posts on technical subjects often get the most hits. Any ads that you run on such posts also tend to be worth more so a post on say optimized network routing could be a lot better than my cat throwing up (then again, a funny video of a cat throwing up could become viral on Youtube and earn you lots of money and fame).

read more

Optimizing WordPress post titles

Optimizing WordPress post titles

You should be aware of the importance a site or page’s title plays in Search Engine Optimization. By default, WordPress displays the title of your blog posts in the format:
Site Name » Post Name

This post would be displayed with the title:
CSS Button » Optimizing WordPress post titles.

This is fine if you aren’t too concerned about SEO, or your site is named Apple and ranks top for it, but otherwise, you’ll be like the thousands of other sites out there. To set yourself apart, you’ll need to experiment and optimize WordPress a little, especially the title.

All in One SEO is one of my favorite plugins for WordPress. It runs a number of optimizations on your site and most importantly, it switches your site’s name with your post’s name, so your title is displayed in the format:
Post Name | Site Name

So this post would now look like:
Optimizing WordPress post titles | CSS Button

This is a lot better than the WordPress default, since now, the most important keywords are in the beginning of the title. But there’s still a lot more you can do.

Your site’s name is usually something unique and you should already be ranked pretty highly for that (try searching for “css button”). However, what’s the point of adding that baggage to your wonderful posts? You want your post to stand out and removing the site’s name will definitely help focus on your current topic. Something pretty simple to do with the All in One SEO plugin.

In your admin panel, under the Settings menu, click All in One SEO. The field Post Title Format: should contain:
%post_title% | %blog_title%

Change this to just:
%post_title%

That should do it. Wait and see what it does to your search engine ranking. It will also help your titles on social media such as Facebook and Digg.

read more

Digg users and Adsense

Digg users and Adsense

It is a popular theory that users coming to your website from Digg and other social media websites, are usually blind to ads and therefore aren’t likely to click them.

This is one reason why many publishers prefer to display Google Adsense (or other forms of advertisement) only to users coming in via search engines.

Some people have argued that doing this won’t hurt your overall earnings and you may just be wasting ad space that could have earned something, even if the click-through rate (CTR) went way down.

However, think about it from an advertiser’s point of view. If I’m paying for ads on your website and getting only a few or no clicks in return, either there is something wrong with my ad or I need to find another website.

By that rationale, my preference as a publisher would be to have a higher CTR to attract higher-paying ads. This is the code I use to check for the referring website and hide my ads from Diggers:

<?php
# Let publish_ads be TRUE to start off with
$publish_ads = TRUE;
# Check that we have an HTTP_REFERER header
if(isset($_SERVER['HTTP_REFERER'])) {
    # See if the header contains "digg.com"
    if (strpos($_SERVER['HTTP_REFERER'], 'digg.com')) {
        # It does, so set publish_ads to FALSE
        $publish_ads = FALSE;
    }
}
?>

We could use a similar approach to do the opposite. i.e. display ads only to search users (users coming in from Google searches, for example).

<?php
# Let publish_ads be FALSE to start off with
$publish_ads = FALSE;
# Check that we have an HTTP_REFERER header
if(isset($_SERVER['HTTP_REFERER'])) {
    # See if the header contains "google.co"
    if (strpos($_SERVER['HTTP_REFERER'], 'google.co')) {
        # It does, so set publish_ads to TRUE
        $publish_ads = TRUE;
    }
}
?>

Now you can check for $publish_ads any place you want to display or suppress the ads:

<?php
# Check if $publish_ads is set to TRUE and display the adsense code if it is
if ($publish_ads == TRUE) {
?>
<script type="text/javascript"><!--
google_ad_client = "pub-0000000000000000";
/* css, 468x60, inline-banner, created 1/1/01 */
google_ad_slot = "0000000000";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php
#Now we close the if
}
?>

There you have it.

read more

Dashes vs Underscores for SEO

Dashes vs Underscores for SEO

There has been a lot of debate about how Google indexes URLs and whether underscores are better for Search Engine Optimization or would dashes give better results?

I have yet to find a proper conclusion to that debate, though due to another realization, I’m now inclined in favor of dashes. Here’s why:

I’ve been using underscores for most of my filenames and URLs and have been avoiding dashes like the plague, probably because it felt like I was subtracting something and because underscores look a little neater.

However, if you know anything about regular expressions, you’ll know that \w is commonly used to match characters or words in a string. In standard regex \w will only match the letters a-z, A-Z and the underscore character.

This means that in a string such as That-the-quick-brown_Fox, \w* will have four matches (“That”, “the”, “quick” and “brown_Fox”) instead of five. If I was writing a script to chop up URLs and index the letters, this is what I’d get.

Even if Google has updated their algorithms to treat underscores and dashes similarly, chances are, most other search engines, applications and websites have not. Therefore, from now onwards, I’m sticking to the da4shes whenever I can. WordPress already sets the URL using dashes, but the same should come in handy for custom URLs and image filenames.

What are your thoughts? (More info)

read more

Welcome to CSS Button

Welcome to CSS Button

Welcome to the new CSS Button site. In addition to providing tips and techniques related to Cascading Style Sheets, this site will showcase useful methods and code that would be invaluable to any webmaster, developer or designer.

You will still find loads of buttons that you may use on your own website for free. Sites offering free buttons are already quite plentiful on the Internet, but what makes CSS buttons special is their speed, simplicity and elegance. We have buttons made entirely out of CSS/HTML that load instantly and you’ll also find buttons enhanced with CSS.

CSSButton

Visit the CSS forms page for ways to improve on the plain HTML forms for your site.

CSS-based buttons offer numerous advantages:
They’re smaller and hence quicker to load
They can be modified much easier than an image can
They are more easily accessible by text-based browsers and web crawlers, giving your site a wider audience and better SEO.
Here are a couple of examples of buttons created or enhanced using plain CSS and HTML. I decided to use inline CSS to make it simpler to use the buttons and cater for different types of buttons on a single page. This does increase the size and you can make the code even smaller by including the CSS in a separate .css file.

xmlatom feed

Browse the collection that we have on this site or create your own and simply paste the code into your page, wherever you want it. It’s as simple as that. I would also appreciate any comments on these.
(Note: The buttons on this site are tested to work correctly with Mozilla Firefox and Opera browsers. Users with IE or other browsers may experience varying results)

read more