Creating a Sitemap for Backlight

Search Engine Optimization (SEO) is like a jigsaw puzzle: a larger picture built of myriad, smaller pieces; the complexity of the puzzle scaling relative to the number of pieces you choose to build with.

Using well-structured markup and anchors, and leveraging your provided text, images, and their associated data, Backlight’s pages and albums create organic opportunities to maximize SEO, while minimizing effort.

The things you’re already doing to create a compelling website …

  • providing clear titles and informative descriptions for albums;
  • using unique, descriptive file names for images;
  • including titles and captions in image metadata, and configuring album templates to use them;
  • writing thoughtful content for your blog posts and pages;

… Backlight puts to good use for SEO. And in Backlight 3, we’ve added RSS feeds, which also contributes to better SEO.

Something Backlight does not provide, though, is a Sitemap.

What’s a Sitemap?

A Sitemap is an XML file that lists the URLs for site, and is used to inform search engines about URLs available for crawling. It allows webmasters to include additional information about each URL: when it was last updated, how often it changes, and how important it is in relation to other URLs of the site. This allows search engines to crawl the site more efficiently and to find URLs that may be isolated from the rest of the site’s content.

The Sitemaps protocol is a URL inclusion protocol and complements robots.txt, a URL exclusion protocol.

Why no Sitemap in Backlight?

So, now that I’ve brought an elephant into the room, let’s briefly discuss it. There are various reasons that Backlight does not generate sitemaps.

Sitemaps might be nice to have, but are not essential. Backlight-generated sites are built in such a way to be crawlable without having an explicit sitemap.

A sitemap should reside at the public root of your website. For security reasons, the public root should not be a writable location, which precludes Backlight from creating it.

While Backlight can be used as a total website solution, many users combine it with WordPress or other content-management systems, or use it alongside a custom-built site. In such cases, a Backlight-generated sitemap would be incomplete, and therefore useless.

We’re a small team, so must prioritize investing our development time and effort into aspects of Backlight that will yield the greatest return; Sitemaps just don’t make sense for us.

There are other, more robust Sitemap solutions, so why expend our limited resources to reinvent the wheel? In fact, I’d like to introduce you to one such solution, right now.

XML-Sitemaps’ Standalone Sitemap Generator

XML-Sitemaps’ Standalone Sitemap Generator PHP script does one thing, and does it very well. It’s easy to install, an excellent companion to Backlight, and a very good value.

For transparency, The Turning Gate has no affiliation whatsoever to XML-Sitemaps. I am recommending their product because I bought it for my own personal use; I’ve installed it, I like it, and I think it’s worth signal boosting.

The install guide does a lot of hand-holding; too much for me, but it should be very easy to follow even for novices.

I recommend the base $19.99 version of the script. For use with Backlight, I think the optional add-ons are unnecessary; and if you want them later, you can add them at any time.

In evaluating whether to implement a sitemap for your website, the most up-to-date and useful reading I’ve found on the matter is this article from Hobo SEO Services. The article is huge, so if the link doesn’t jump you to the relevant part of the page, then look for “On-Site; Do I Need A Google XML Sitemap For My Website?” in the table of contents.

Try It First

To try things out, visit the XML-Sitemaps Homepage. At the top of the page, you can feed it your site address; the service will crawl your site and generate a downloadable XML sitemap of up to 500 pages.

Seems like a large number, but your Backlight site will quickly hit that ceiling as you populate albums with images.

While the resulting sitemap may be too incomplete to be useful, you can at least see the result of running the script.

Putting Things Together

I’m not going to get deep into setup, as their documentation well covers things, but I would like to shout out some general advice.

First, set up Google Search Console for your site. This will give you some insight into what Google is actually doing with your site, and allow you to track some aspects of the site’s performance.

Take note of the “Sitemaps” item in the sidebar. Here, you can tell Google the address of your sitemap, so that it knows to find it. It will read the sitemap periodically to take in any updates.

After installing the Standalone Sitemap Generator, go to Configuration => Advanced, and enabled the option “enable canonical URLs”; Backlight has canonical URLs, so I reckon it’s worth turning this on.

Be sure to generate an updated sitemap every so often, depending on how frequently you update your site. If you find yourself doing this a lot, then you can set up a cron job to automatically run the script on a regular interval. There’s some info on cron jobs in the documentation.

After generating your first sitemap, don’t forget to return to the Google Search Console to give it your sitemap URL.

Finally, you might want to combine your sitemap with a robots.txt file. I have been experimenting – slowly – with different robots.txt rules. I haven’t entirely settled on best practices, but I have added some information to Backlight’s documentation, robots.txt.

If using a robots.txt file, then also be sure to enable the “use robots.txt file” option on the Advanced configuration page of the sitemap generator.


Sitemaps are an optional part of your SEO strategy, but you may find them worthwhile. If so, then I hope this article will have been helpful to you.

But if you’re running your site mostly as a hobby, for an audience primarily consisting of your family, or similarly passive purposes, then a sitemap may be overkill for your needs. Backlight does a good job of being crawlable on its own, so there’s no real pressure to add a sitemap if you’re not actively looking for attention.

If looking to broadcast your site as effectively as possible, though, then yeah, do a sitemap. Every little bit helps.