While working on adding more statistic tracking tools to the site yesterday, I was also asking myself the question: How can I get better search engine results? Faster! I know it takes time for new sites to be discovered and included in Google and other search engines, but my domain,
cdchase.com, is not new as it has been in use for several years, and has that benefit. However, using Google’s Webmaster Tools, I discovered the site had not been crawled since November! That’s almost five months! I’ve been promoting my 30th class reunion over there, so I need those pages checked more often.
I had played around with sitemaps a little in the past, and knew it had to be the answer. With a blog, we have the benefit of ‘pinging’ other sites when we make a post to advise them that there has been a new entry made. Sitemaps work similarly with the search engines in general, you can add one to your standard website, as well as your blog. Google as well as other sites allow you to submit your sitemap file so you know they have the URLs that you want listed. They get the data they need in a standard format, and we get an easy way to maintain it! Every one wins! The Google Sitemap protocol was eventually adopted by Yahoo! & MSN and Sitemaps.org was created. I expect other search engines will follow.
Adding a sitemap to a WordPress blog is very easy… just use the Sitemaps plugin by Arne Brachhold! This plugin will generate an updated sitemap.xml file in the root folder of your site for the search engines to find–and then tell them it’s been updated! It pings Google, Yahoo! & MSN automatically. You do have to do a little configuration the first time around, making sure the sitemap.xml file in the root folder of your site is writable by WordPress, and acquiring a developer ID from Yahoo! to use their submission API.
If you are using Christine’s Ultimate Tag Warrior, aka UTW, (If you aren’t you should be!) then you will need an add-on to supplement the Sitemap plugin in order to get tags added to your sitemap file. Thankfully, the folks at the Dicontas blog have produced the WordPress Google Sitemap Generator – Ultimate Tag Warrior – Tags Addon Plugin to do just that! While the only trick to this add-on is they say to modify it for your configuration, but then aren’t very clear about exactly what that means. Just to make sure that the ‘add trailing slashes’ option is on for UTW. Here’s what they mean: in their UTWGoogleSitemaps.php file, on line 18 you will see:
$utw_tag = get_bloginfo('url') . '/index.php?tag=' . $utwtag->tag;
If you are using rewrites so your URLs appear like, ‘/tag/some-tag-name/’ for your posts, rather than the default, ‘/index.php?p=some-tag-name’, then you need to update the line above to:
$utw_tag = get_bloginfo('url') . '/tag/' . $utwtag->tag . '/';
Then save and upload as usual for plugins. Run a manual update of your sitemap and it will now include your tags at the end of the file. See an example of my sitemap.xml. Note, to get the ‘pretty’ version of the file you should see from this link, you are really looking at the sitemap.xml file with an XSL stylesheet applied.
If you have a standard web site that could also use the benefit of a sitemap.xml file, there are several different sitemap generators available, as listed at Google Code – Sitemaps page. I chose to use phpSitemapNG. After installing in a protected directory of my web site, and making sure it could write to the root folder, I went through it’s configuration which is mostly defaults, but be sure your host name is specified as you would like it to appear in Google–I’ve gone back & forth between using cdchase.com & www.cdchase.com. When I went to submit the sitemap to Google the first time, I realized I had used www, but had generated the sitemap with just cdchase.com, so it failed. Had to update the config and run it again. You will have th opportunity to update page titles, update frequency & priorities before actually generating the files. For details on these, see the Sitemaps.org Protocol page.
With this tool, and probably most any of them, the sitemap must be manually generated whenever a new page is created. Whereas with the WordPress plugin, it is updated automatically. Want to know how well it works? I made a post earlier today, and was playing with Google Blogsearch, and found my post! It even had a timestamp indicating it’s recency as ‘1 hour ago’! That’s impressive and shows the benefit of sitemaps and pinging on change.
Stay tuned for more on ‘pinging’!