An XML sitemap is a file that lists all the important pages on your website, helping search engines like Google discover and crawl your content efficiently. Think of it as a roadmap of your site — it tells search engine bots exactly where to find your pages, when they were last updated, and how important they are relative to each other. For Tanzanian businesses looking to maximize their search visibility, a properly configured sitemap is essential.
Understanding XML Sitemap Structure
An XML sitemap follows a specific format defined by the Sitemaps Protocol. Here is the basic structure:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://yourbusiness.co.tz/</loc>
<lastmod>2026-03-01</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://yourbusiness.co.tz/services/</loc>
<lastmod>2026-02-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
Sitemap Elements Explained
- <loc> (Required): The full URL of the page. Must include the protocol (https://).
- <lastmod> (Recommended): The date the page was last modified in YYYY-MM-DD format.
- <changefreq> (Optional): How frequently the page changes — always, hourly, daily, weekly, monthly, yearly, never. Google largely ignores this but it does not hurt to include it.
- <priority> (Optional): A value from 0.0 to 1.0 indicating the page's importance relative to other pages on your site. Your homepage is typically 1.0.
Creating Your Sitemap
Method 1: CMS Auto-Generation (Easiest)
Most modern content management systems generate sitemaps automatically:
yourdomain.co.tz/sitemap_index.xml.
Method 2: Online Generators
Free tools like XML-Sitemaps.com can crawl your site and generate a sitemap file. Simply enter your domain, configure the settings, and download the generated file. This works well for smaller sites with fewer than 500 pages.
Method 3: Manual Creation
For small, static websites, you can create the XML file manually using any text editor. Follow the structure shown above and list every page you want indexed.
Sitemap Index Files for Large Sites
If your website has many pages, create a sitemap index that references multiple individual sitemaps:
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://yourbusiness.co.tz/sitemap-pages.xml</loc>
<lastmod>2026-03-01</lastmod>
</sitemap>
<sitemap>
<loc>https://yourbusiness.co.tz/sitemap-products.xml</loc>
<lastmod>2026-03-05</lastmod>
</sitemap>
</sitemapindex>
Uploading Your Sitemap
https://yourdomain.co.tz/sitemap.xml. Use File Manager in your hosting control panel or FTP.
Submitting to Google Search Console
Google will process your sitemap and report the number of URLs discovered, any errors found, and the indexing status over the following days.
Submitting to Bing via Webmaster Tools
Do not forget about Bing. While Google dominates search in Tanzania, Bing still drives traffic, and submitting your sitemap is quick:
Adding Sitemap Reference to Robots.txt
As a best practice, reference your sitemap in your robots.txt file. This ensures any search engine crawling your site can find it:
Allow: /
Sitemap: https://yourbusiness.co.tz/sitemap.xml
Sitemap Best Practices
- Only include canonical URLs: Do not include duplicate pages, paginated archives, or URLs that redirect.
- Keep it updated: Use accurate
<lastmod>dates. Do not set all dates to today's date — this reduces Google's trust in your lastmod data. - Match your sitemap to robots.txt: Do not include URLs in your sitemap that are blocked by robots.txt.
- Use HTTPS URLs: All URLs in your sitemap should use HTTPS if your site has an SSL certificate.
- Include only indexable pages: Exclude pages with noindex meta tags, login pages, admin areas, and thin content pages.