Feed on Posts or Comments

Social Bookmarking & AdSense Chris Gray on 02 Jul 2007

AdSense, you better pay up sucka.

When I signed up for a MyBlogLog account a few months ago I was really impressed by their service.  Not only could I meet other bloggers in my niche, I could also see who was visiting and when.  Around the same time that I added the MyBlogLog tracking widget I also decided to monetize with a few AdSense link units. Now having a MyBlogLog account was not only a great way to see who was reading but it was now also a great way to track my AdSense clicks (or at least I thought).

After a month or two I started to notice that while MyBlogLog was reporting numerous AdSense clicks, AdSense was showing virtually nothing. At first I thought that there might be a lag between when a user clicked the ad and when Google would report the revenue. Unfortunately this is not the case…take a look at a snapshot from the other day (below).

AsSense you a liar!

So what gives!? Has anyone else seen this with their own blog? I was under the impression that a click was a click was a click. I guess not!

Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Technorati
  • YahooMyWeb
  • Bumpzee

SEO Chris Gray on 18 Jun 2007

The correct way to move a web page to a new URL – the 301 Redirect

A few weeks ago I found myself in a situation where I needed move a blog post to a new URL. In the past I would have never given this task a second thought…rename the slug, update internal links (if any), and done. Enter Search Engine Optimization. Now that I am cognizant of such SEO buzzwords as “Index”, “Page Rank” and “Duplicate Content”, moving a page is no longer a trivial task.

The Problem
By simply moving your page to another URL, you can loose your current ranking for that page in the search index. Any link equity that you have built up over time is lost…not to mention that you will also be serving up 404s to any user that has linked to, or bookmarked your page.

Available Solutions
There are a number of ways to handle moving a page to a new URL but not all are suitable in terms of search engine optimization.

Maintain two copies of the same file
Obviously this solution has duplicate content written all over it and is not recommended. Search engines are cracking down on sites that host duplicate content and you will penalized for doing so.

Meta-Refresh
The meta-refresh tag forces the browser to refresh after a specified period of time. If you specify the URL to your new page in the “content” attribute, the browser will fetch the new URL instead of the current one (effectively redirecting to your new URL).

<meta http-equiv=”refresh” content=”0;url=http://myDomain.com/myNewUrl.php”/>

Some search engines consider the meta-refresh approach a “sneaky redirect” and will penalize you for using it (same goes for using JavaScript to redirect to a new URL).

302 Redirect
Also known as a “Temporary Redirect”, the 302 HTTP header is used to notify the browser that the requested page has temporarily moved to a new URL. This method should only be used when you are truly only temporarily moving your page. Search engines that encounter a 302 redirect will continue to crawl your page from it’s original location.

In the past, 302 redirects have been associated with page hijacking and you may be penalized you for using this method to move your page (just like the meta-refresh method above).

301 Redirect
Also known as a “Permanent Redirect”, the 301 HTTP header is used to notify the browser that the requested page has permanently moved to a new URL. The 301 redirect is the recommended method to move a page to a new URL.

How to implement a 301 Redirect

.htaccess file
At the web server level, add the following line to your .htaccess file of your Apache installation.

redirect 301 /myOldPost/postName.php http://myDomain.com/myNewPost/postName.php

The following code changes are made at the page level:

C#.NET

<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(”Location”,” http://myDomain.com/myNewPost/postName.aspx”);
}
</script>

PHP

header(”HTTP/1.1 301 Moved Permanently”);
header(”Location: http://myDomain.com/myNewPost/postName.php”);
exit();

Java/JSP

<%
response.setStatus(301);
response.setHeader(”Location”, “http://myDomain.com/myNewPost/postName.jsp “);
response.setHeader(”Connection”, “close”);
%>

Conclusion
I have to admit that I initially used a meta-refresh to perform the redirect that I mentioned at the beginning of this post. After (literally) stumbling upon an article on “how to redirect a web page, the smart way” the other night I realized that I was approaching this problem in the wrong manner. I ended up going the .htaccess route because I did not know how to execute PHP from within a post (I’m sure there is a way). Hopefully you will also find this information useful. Please let me know if there is a certain example that you would like me to add (i.e. IIS or Perl perhaps)…I only covered the technologies that I currently use.

Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Technorati
  • YahooMyWeb
  • Bumpzee

WordPress & SEO Chris Gray on 07 Jun 2007

You’re a sneaky one Google Sitemap Generator

Ok, I just had a WTF moment… A couple of weeks ago I posted an article on how to avoid Google’s Supplemental Index. I suggested using a robots.txt file to prevent Google from indexing duplicate content so as to avoid the supplemental index. While perusing my WordPress root directory last night I ended up taking a peek at my sitemap (sitemap.xml). Much to my surprise there were a bunch of references to URIs that I just finished blocking in my robots.txt…WTF!?

And then it hit me…I was using the Google Sitemap Generator plug-in to automatically generate my sitemap…there was probably a setting in there throwing things off. For those of you who are not familiar with this plug-in, it automatically re-generates your sitemap.xml every time you post…saving you the trouble of having to manually update it by hand after each post.

Sure enough, come to find out that I didn’t uncheck a number of key default settings when I activated the plug-in. The default settings are shown below:

Google Sitemap Generator Defaults

Well there it is…duplicate content. Since I am showing full posts on the home page and categories, I was asking Google to index duplicate content by also including individual posts and archives in the sitemap. A case when the defaults really should not be defaults IMHO. The thing that gets me is that the readme for this plug-in actually says to use the defaults!

Q: “So much configuration options… Do I need to change them?”
A: “No! Only if you want. Default values should be ok!”

So in an effort to remove duplicate content from my sitemap I only checked “Include posts” and “Include static pages” (see below). I am hoping that this will help.

Google Sitemap Generator Fixed Settings

The lesson I learned all too well was that I need to take the time to understand and configure a new plug-in before I activate it. From now on I plan on testing out new plug-ins thoroughly (in my local sandbox) prior to activating them on my production site…

So now I am curious…what is the best way to configure Google Sitemap Generator for SEO? I would love to hear your recommendations!

Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Technorati
  • YahooMyWeb
  • Bumpzee

« Previous PageNext Page »