Monday, December 1, 2008

Yahoo Sitemap Generator

Writen by Miles Evans

I got an email from a friend commenting on my previous article on building some free organic rankings. His problem was that he was nailing his keywords, but that it was taking far too long. He also noted that he was getting nowhere getting listed high in the SERP's at Yahoo. When I ask him if he is generating sitemaps on a regular basis for Google and Yahoo we quickly realize why this is happening. Last month I discussed automating Google Sitemaps for Movable Type and in this article I will describe how I do this for Yahoo as well.

As you may know Yahoo uses a different approach to sitemaps than Google. Instead of XML Yahoo just wants a list of URL's in a text file. Searching around did not yield too much info but I finally found a solution. My approach was to take the sitemap we generate automatically for Google and convert it to a sitemap for Yahoo with some PHP.

Download the Google to Yahoo sitemap code.

You should have two files: g2y.php and yahoo-sitemap.txt. Open g2y.php and change the top configuration lines to match that of your own website:

$input_file = "http://www.yoursite.com/sitemap.xml";
$output_file = "yahoo-sitemap.txt";

Now upload both files to your server where the Google sitemap.xml file lives and set the permissions on the yahoo-sitemap.txt file to chmod 777, or writable by anyone. Test the script to see if it is working by hitting www.yoursite.com/g2y.php. You see a bunch of URL's from your website? Good!

Ok so now that you have the sitemap being generated how do you automate it? I stumbled on this for a bit but the best way seems to be good old fashioned cron. Open your crontab and add the following line:

0 * * * * root fetch http://www.yoursite.com/g2y.php

So this will run your Yahoo sitemap generator once/day. Now all that is left to do is head over to Yahoo and submit the yahoo-sitemap.txt file we just created. Unfortunately, unlike Google, you have no way to see if Yahoo is spidering your site or how frequently aside from checking your logs. Yahoo are you listening?

If you are lagging in the Yahoo SERP's this should really help. If you do not see yourself showing up at all for a long period after implementing this, don't panic – Yahoo spiders seem to be rather lazy. Eventually they will find you.

In a future article I might look at doing the same for MSN, but nailing the top of MSN is really kind of easy if you follow basic organic SEO practices. Naturally Miscrosoft spiders expect yet another standard for their sitemaps so this will take some investigation.

Miles Evans provides indepth reviews on every SEO/marketing or killer app he can get his paws on. His reviews, essays, and tools on SEO, OLM, reporting, and other equally fascinating subjects are normally carried out at ProfitPapers.com - Stop by and check out the free backlinks page.

No comments: