About XML Sitemap

Generates an XML sitemap at yoursite.com/sitemap.xml for use with Google Webmaster Tools etc.

Category 1Markup Generation
Markup modules that are called upon to generate or parse markup (like HTML). Markup modules are most often used on the front-end of a site (rather than admin).
Category 2SEO/Accessibility
Modules designed to help site accessibility, standards compliance and SEO.
Release StateStable
Should be safe for use in production environments. *
Authorpete
Module Version1.1.0
Class NameMarkupSitemapXML
Compatibility2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0
Date AddedJuly 25, 2012
Recommended ByNew recommendations may take up to 1 day to appear.

Details

I missed the XML sitemap generator that I used in a previous CMS so I built my own module to achieve the same functionality.

This module outputs an XML sitemap of your site that is readable by Google Webmaster Tools etc. I've generally found that it reduces the time it takes for new sites and pages to be listed in search engines using one in combination with Webmaster Tools etc (since you're specifically telling the service that a new site/new pages exist) so thought I may as well create a module for it.

The module ignores any hidden pages and their children, assuming that since you don't want these to be visible on the site then you don't want them to be found via search engines either.

It also adds a field called sitemap_ignore that you can add to your templates and exclude specific pages on a per-page basis. Again, this assumes that you wish to ignore that page's children as well.

The sitemap is accessible at yoursite.com/sitemap.xml - the module checks to see whether this URL has been called and outputs the sitemap, then does a hard exit before PW gets a chance to output a 404 page. If there's a more elegant way of doing this I'll happily change the code to suit.

UPDATE: As of v1.0.4 it supports the LanguageLocalizedURL module thanks to Soma.
UPDATE: 1.0.5 fixed some bugs
UPDATE: 1.0.8 adds multisite support - thanks Teppo!

Instructions

This module's files should be placed in /site/modules/MarkupSitemapXML/
How to install or uninstall modules

README

MarkupSitemapXML

A module for ProcessWire that generates a sitemap.xml file for use with major search engines.

Comments

  • Andoro

    Andoro 4 years ago 00

    When will the sitemap.xml generated?

  • greg.ms

    greg.ms 3 years ago 00

    Call http://your-domain.com/sitemap.xml, it will be auto-generated

  • Nikolaus Rademacher

    Nikolaus Rademacher 3 years ago 00

    Looks great! Any ideas on how to implement it with URL segments allowed?

  • Momo

    Momo 2 years ago 50

    Great Module! Is it still compatible with 2.5 and 2.6?
    Big thanks.

  • Svet

    Svet 1 year ago 00

    Thanks, site map generated with a few clicks. Cheers! :)

  • Christoph

    Christoph 11 months ago 00

    It is compatible with pw 3 or is there a alternative to generate sitemap.

  • Carlo

    Carlo 7 months ago 00

    I'm usign this module with PW 2.6 and 2.7 and it works. I don't know if it does with PW 3.
    Anyway I think that the author should update the compatibily information of the module in this page.
    Thank you Pete!

  • Cengiz

    Cengiz 7 months ago 00

    It works with PW 3
    Thank You

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.