You are here:  » Extra additions to sitemap

Support Forum



Extra additions to sitemap

Submitted by jonny5 on Fri, 2008-11-07 15:45 in

If I add some extra pages to a website like one off promotions that are static html pages , is there a way to get them included in the sitemap?

Submitted by support on Fri, 2008-11-07 16:44

Hello Jonny,

This is quite straight forward as sitemap.php just generates a sitemap index, so all you need to do is hard code an index entry to your extra pages sitemap, and also create the extra pages sitemap manually using a text editor.

Within sitemap.php, look for the following code on line 82:

print "</sitemapindex>";

...and REPLACE this with:

print "<sitemap><loc>".$sitemapBaseHREF."extraSitemap.xml</loc></sitemap>";
print "</sitemapindex>";

And then, create a NEW file called extraSitemap.xml, like this:

<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns='http://www.google.com/schemas/sitemap/0.84' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd'>
<url><loc>http://www.example.com/otherPage1.html</loc></url>
<url><loc>http://www.example.com/otherPage2.html</loc></url>
</urlset>

...and that should do the trick!

Cheers,
David.

Submitted by jonny5 on Fri, 2008-11-07 18:40

cheers David

all works fine