Sitemap.xml for Joomla

Once your site is populated with data and pages you should create a sitemap AND submit it to Google / Bing, etc. Note that a sitemap will not in itself raise your rankings in Google. They mainly serve as a way to inform Google about your site structure and content. Especially for new sites and new content for existing sites this usually helps you to get these pages quickly indexed in the search results pages.

In this article, I will discuss various sitemap solutions, how to inform Google about them and finally some more advanced topics.

HTML and XML sitemaps

We have to distinguish between XML and HTML sitemaps. The HTML sitemap is mainly for your users, so they have a nice overview of your site. For sites smaller then 10 pages I would not bother, but larger sites may certainly benefit from one. More important for your SEO ranking is the XML sitemap. Note that it will not simply raise your rankings in Google, but your pages will be included in the Google index much faster if you use one.


This is basically a file called sitemap.xml which is usually (but not necessarily) placed in the root of your site. This is where search engines would routinely expect it to be sitting, unless told otherwise in your robots.txt file). The sitemap.xml file contains the structure of the URL's of your Joomla website in a logically structured XML-file. This helps Google and other search engines to determine the structure of your website and how to reach all parts of it. Actually, you could see this as a part of the internal-link-building process. The file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="" etc. etc.>

Joomla Hosting tip: Siteground loads in 0.5 - 1 second and has a Pingdom score of 100%!!! Reason enough to recommend Siteground hosting. Fast servers, great support, free SSL, etc. And it's not expensive at all...


Online and desktop sitemap generators

For smalll sites with relatively little content, or sites that don't change too much,  the easiest solution might be to generate it using an online sitemap generator and just place the file in the root of your site. An example of an XML-sitemap generator is Just supply the URL of your home page, and the tool will crawl your site just like the Google bot would do. After crawling, you can download the sitemap in various formats (open and check it first, to verify it looks fine). Make sure you only include URL's you want to have included in Google. If necessary, edit the file and remove stuff like login-pages, etc. For Google, use either the sitemap.xml version, or the G-zipped version sitemap.xml.gz. You can also download a HTML version that you can possibly use to offer a sitemap page for your users. By the way, you can also generate sitemaps from the SEO tool Screaming Frog SEO Spider. It's a free desktop tool with many advanced SEO features. For 10 more of these (including commercial ones, check this post:

Joomla Sitemap extensions

Though you can sometimes use the manual method of creating sitemaps, you can also use many Joomla sitemap extensions. For larger and changing sites, you probably really need one of those. Often, they also offer additional features, like automatic sitemap generation and submission to search engines.

OSmap (formerly Xmap) is a popular free extension, but there are some more. Especially Jsitemap is very nice. It is a commercial extension, but very popular. It was even listed as the Top rated extension on the JED for a while, with only 5-start reviews, so it's probably a safe choice.... OSmap is well-suited for simpler sites, where every article is linked to a menu-item. Articles not directly associated with a menu-item are not included in the sitemap then. Jsitemap does include those articles, so may be better suited for sites with many blog-views.

Whichever one you use, make sure it supports your content types. If you only use core Joomla articles, you will be fine, but for 3rd party extensions, this is not always the case. Say you have a webshop, the sitemap extension should be able to understand the URL's for your extension (Virtuemart, Hikashop, etc.), so check this before you install the extension. Often these extensions create fine sitemaps with just the default settings, but it always pays to go through the configuration to finetune the output. You are often allowed to exclude stuff (articles, categories) that are only usefull for service purposes, like terms & conditions, login-pages, etcetera.

Image and video sitemaps

If images are very important for your website you might even add the URL's for the images in an image sitemap, though for most sites this might not be necessary. This would look like this:


Also the image sitemap should be submitted to your Search Console / Webmaster Tools account. Sites with many videos can even contain a video sitemap. Contrary to basic XML-generators, there are hardly any that can create image or video sitemaps, so if you need these, it is best to use a sitemap plugin that supports these.

Joomla Hosting tip: Siteground loads in 0.5 - 1 second and has a Pingdom score of 100%!!! Reason enough to recommend Siteground hosting. Fast servers, great support, free SSL, etc. And it's not expensive at all...


Multilingual sites

Note that if your site is multilingual, it is wise to have separate sitemaps per language. The most well-known sitemap extensions all support this. As an example, if you have OSmap installed, with English, French and German languages, you will have three sitemaps automatically:

  • en/?option=com_osmap&view=xml&tmpl=component&id=1
  • fr/?option=com_osmap&view=xml&tmpl=component&id=1
  • de/?option=com_osmap&view=xml&tmpl=component&id=1

You can submit these sitemaps on a per language basis in Google Webmaster Tools then.

What to include in your sitemaps

Many extensions and online sitemap-generators include all your URL's by default. However, this may not always be the best way to go. If you carefully examine your site, there may be URL's that do not really add value for Google. Think of pages like your terms and conditions, login-pages, etcetera. If you take care only to include the really valuable pages and leave the fluff out, "Google will consider the pages that are in the sitemap as more important and Google will crawl it sooner" (see Many extensions offer the possibility to select your URL's to include by menu, so make sure to only include youur valuable menu-items then.

Inform Google of your sitemap

Always make sure to submit the location of your sitemap to Google's Search Console / Webmaster Tools. Also, you can specify the location of your sitemap.xml file in your robots.txt file, by adding a line like this (especially if it is not located in the site root):


Repeat this for every sitemap you have. You can have multiple XML sitemaps, but also the image and video sitemaps should be submitted (for multilingual sites: use separate records in GWT). After some days you should see that the submitted URL's are included in the index. You can see this in Gooogle Webmaster Tools too:

sitemaps in google webmaster tools

Advanced tip 1: URL-rewrite the path

The following tips are definitely not necessary, but for advanced usage, they may be useful. One tip is for users that use extensions like OSmap to create their sitemaps. If you do, you will usually have a non-standard location for the file, not in the root of the site where search engines would usually expect to find it. You can rewrite the path so that it will be found at the exact location for them:

RewriteRule ^sitemap.xml$ index.php?option=com_osmap&view=xml&tmpl=component&id=1 [L]

Thanks to Rene Kreijveld for the tip.

Advanced tip 2: Prevent Google from indexing the XML file

This should definitely not worry you, but Google will often treat your sitemap as an ordinary piece of content and index it. You will usually only see it for very exact searches, or when you use the command in Google:

sitemap in serp

You can prevent the file from being indexed though. Just place the following code in your .htaccess file (make sure to include the correct path to the file):

<IfModule mod_rewrite.c>
<Files sitemap.xml>
Header set X-Robots-Tag "noindex"

For more information on this: 

Advanced tip 3: Use your sitemap for multilingual versions of pages

If you have a multilingual site you will usually use the rel="alternate" hreflang="xx-XX" attribute in the head section of your site to indicate multilingual versions of your pages. This is how the Joomla core already works. However, if you have multiple sites in separate installations you could use your sitemap to indicate the multilingual versions of the page, like this:


You would probably have to create this setup manually, since installtions will usually be independant, but it could be a way to inform Google that you have a site with duplicate content in multiple languages. By the way, you can use this technique within a single multilingual site as well, but then there are easier techniques you can apply.

About this site is fully built and written by Simon Kloostra, SEO Specialist and Webdesigner from the Netherlands. I have also published a book and blogs for companies like OStraining, TemplateMonster, SEMrush and others.