Using Google XML Sitemaps with Posterous
Since moving my blog to Posterous, I've been very pleased with how things have panned out. Its a nice simple posting interface, and I don't need to worry about maintaining the server or blogging software. One tiny frustration I encountered was seemingly having no control over XML sitemaps which can be submitted to search engines. Since you cannot upload files to the server directly, there is no obvious way to make it work.
After doing some experimentation, prompted by an upcoming post on SEO, I believe I have found a workaround for this, allowing Posterous users to upload XML sitemaps which can then be submitted to Google. This only works if you are using a custom domain, like I am with sourcebottle.net, but it seems to work.
To begin, you need an XML sitemap which can be created using a number of automated tools or even by hand. It should reference pages and/or resources on your custom domain.
Once you have your sitemap, email it to your Posterous email address and a new post should be created. If you view the post you'll see that the XML document is being loaded into Scribd. Since we probably don't want readers to see this, we can go ahead and make it private.
If we look at the HTML code of the post, you should be able to see a JavaScript block which looks like this:
var scribd_doc = scribd.Document.getDocFromUrl('http://posterous.com/getfile/files.posterous.com/sourcebottle/LPuXsUEcENyvGt4dlrxve5SsyKwGjmYA7IaTLloIWWExyV4j1FFArCzj0l8j/sitemap.xml', 'pub-50214570658991172461');scribd_doc.addParam('height', 600);scribd_doc.addParam('width', 500);scribd_doc.addParam('public', true);scribd_doc.addParam('disable_related_docs', true);scribd_doc.addParam('my_user_id', 'user239689');scribd_doc.write('bxzExFptdB');
The URL of the sitemap stored on Posterous's server is visible:
http://posterous.com/getfile/files.posterous.com/sourcebottle/LPuXsUEcENyvGt4dlrxve5SsyKwGjmYA7IaTLloIWWExyV4j1FFArCzj0l8j/sitemap.xml
Now before we submit it to Google, we need to modify the URL so that it is pointing to your custom domain. If you hit the URL in your browser you'll see it redirects to the file itself. In my case:
http://sourcebottle.net/getfile/files.posterous.com/sourcebottle/LPuXsUEcENyvGt4dlrxve5SsyKwGjmYA7IaTLloIWWExyV4j1FFArCzj0l8j/sitemap.xml
We can now login to Google Webmaster Tools and submit this URL as a new sitemap. Usually within an hour or so, it will be spidered. Voila you have a sitemap for your Posterous site!
Now this method has one downside - the sitemap itself is fixed the moment you upload it, you can't update the file using this method, so if you have an updated sitemap, you'll need to follow these steps and submit it again. This can be handy though for relatively static sitemaps, such as ones specifically for video or geo content.


Comments 0 Comments