May 9, 2009 1:23 pm GMT
Creating an automatic news sitemap for a TypePad blog
by Gary IllyesGoogle News is one of the most popular news sources on the internet. It is a very convenient way to obtain information about, practically anything which happened in the World. The news is submitted by Google News Publishers, which are either websites like The Guardian is, or simple blog-like websites, just like Devoracles is.
The publishing software used also differs massively: one news publisher uses custom coded engines, others use some open source software like WordPress is, and there are people which use closed source, hosted engines like TypePad is.
Google News finds the articles on the publishers’ websites either by looking at so called “news hubs” – a page which lists in a human-readable way the links to the articles -, or looking at so called “news sitemaps”. The news sitemaps are XML files using a specific markup, which is described and presented here.
Obtaining a news sitemap can be quite difficult with TypePad as you have to get familiar with advanced template tags while with for example WordPress, a news sitemap can be created by simply installing a plugin.
In order to create a news sitemap with TypePad, please follow the below steps:
- Log in to your administration back-end, then go to
Weblogs >> Design - Click on the
Create New Index Templatelink - In the Template Name field type Google News Sitemap
In the Output file field type news_sitemap.xml - In the box labeled
Template Bodycopy paste the following code:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
<MTEntries lastn="10" days="3">
<url>
<loc><$MTEntryPermalink encode_xml="1"$></loc>
<news:news>
<news:publication_date> <$MTEntryDate format="%Y-%m-%dT%H:%M:%SZ"$> </news:publication_date>
</news:news>
</url>
</MTEntries>
</urlset>
- Save the tamplate
- Try to access the sitemap by navigating to http://example.com/news_sitemap.xml, where
example.comis your blog’s domain name. - Add the URL of the news sitemap to your Google Webmaster Tool account
There is only one thing which can go wrong, specifically that while copying the code, a linebreak or whitespace appears in a place where it shouldn’t. To resolve this issue, just compare the source of your sitemap and the sample which Google provided.
















James on Sat, 9th May 2009 5:56 pm
Just wanted to say that this works perfectly — no easy trick given that Typepad isn’t the most user friendly blogging system. Thanks Devoracles!
kent on Thu, 28th May 2009 2:22 pm
Hi there, do you have a tutorial or some tips doing this on a expressionengine site?
Best Retgards
Kent
Gary Illyes on Thu, 28th May 2009 2:25 pm
At the moment no. We will create one as soon as I familiarize myself with the software and it’s API
Help on Tue, 16th Mar 2010 5:53 pm
… I am getting the following error:
Your Sitemap uses a News format that is no longer supported for newly-submitted sitemaps. Please update to the new format, which involves attaching a tag and other relevant tags to each url in your Sitemap.
Please advice
Help on Thu, 1st Apr 2010 5:31 pm
This is outdated format of the news sitemap… Please do not use this…