How to Create a Google-Friendly XML Sitemap (2026 Guide)
By Rafirit Station Editorial Team · Updated 2026 · ⏱ 12 min read
A google-friendly XML sitemap is one of the most underrated SEO levers. According to Google, websites that submit a well-structured sitemap see up to 30% more of their pages indexed within 48 hours (source). Yet most Dhaka-based businesses either skip it or generate a broken sitemap that confuses crawlers.
In 2026, Google’s algorithms have become more reliant on sitemaps to understand site structure, especially with the rise of JavaScript frameworks and dynamic content. A sitemap is no longer a nice-to-have—it’s a ranking prerequisite.
The cost of inaction is steep. A poorly indexed site in Dhaka can lose ৳50,000–৳1,20,000 per month in missed leads and sales. Without a proper sitemap, your best content stays hidden from search engines.
By the end of this guide, you’ll know exactly how to create, validate, and submit a google-friendly XML sitemap that boosts your indexing speed and organic traffic. We’ll cover tools, common mistakes, and a real case study from a Dhaka client.
📚 External Resources (Bookmark These)
- Google Sitemap Documentation
- Sitemaps.org Protocol
- Yoast XML Sitemap Guide
- Moz Sitemap Guide
- Semrush XML Sitemap Blog
- Ahrefs XML Sitemap Guide
- Backlinko Sitemap Tips
- Search Engine Journal Guide
- Neil Patel Sitemap Tips
- Shopify Blog on Sitemaps
🔗 Rafirit Station Services
- SEO Services — Full audit & strategy
- SEO Agency Dhaka — Local SEO experts
- Web Analytics — Track your organic rankings
- Content Writing — SEO-optimised copy
- CRO Services — Turn traffic into revenue
- Case Studies — Real SEO results
- Packages & Pricing
- Rafirit Station Bangladesh — Digital Agency
- Rafirit Station Dhaka — Full-Service Agency
🚀 Get Your Sitemap Audited for Free
For Dhaka business owners who want to double their indexed pages in 7 days.
🗓 Book Your Free Strategy Call →
No commitment · 60-minute session · Bangladeshi clients welcome
Phase 1: Understanding the Anatomy of a Google-Friendly XML Sitemap
Before you create a sitemap, you need to know what Google expects. A google-friendly XML sitemap follows the Sitemaps Protocol (version 0.9) and includes only canonical URLs. It must be UTF-8 encoded, use proper XML tags, and have a maximum size of 50MB (uncompressed) or 50,000 URLs. For larger sites, you’ll need a sitemap index file.
Tactic 1.1: Master the Essential Tags
Why this works: Each tag tells Google something about the URL—its importance, update frequency, and freshness. Without these, Google treats every URL equally, which may waste crawl budget.
Exactly how to do it:
- Use
<urlset>as the root element with the correct namespace (http://www.sitemaps.org/schemas/sitemap/0.9). - For each URL, enclose in
<url>tags. - Add
<loc>(required) with the full canonical URL. - Add
<lastmod>with the date of last modification in W3C format (e.g., 2026-03-15). - Add
<changefreq>(optional) — values: always, hourly, daily, weekly, monthly, yearly, never. - Add
<priority>(optional) — from 0.0 to 1.0, default 0.5. - Validate your XML using a tool like XML Sitemaps Validator.
Pro script / template:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://www.example.com/</loc> <lastmod>2026-03-15</lastmod> <changefreq>weekly</changefreq> <priority>1.0</priority> </url> </urlset>
📊 Expected results: Properly tagged sitemaps can increase crawl rate by 25% and reduce indexing lag from weeks to days.
Tactic 1.2: Exclude Low-Value Pages
Why this works: Google has a crawl budget. If your sitemap includes duplicate, thin, or parameter-heavy URLs, crawlers waste time on them instead of your money pages.
Exactly how to do it:
- Identify all URLs on your site that return 200 but have no indexable content (e.g., tag pages, filtered search results).
- Use a tool like Screaming Frog to crawl your site and export URLs.
- Remove any URL that uses tracking parameters (utm_source, etc.) from the sitemap.
- Exclude pages blocked by robots.txt, noindex tags, or canonicalized to another page.
- Limit the sitemap to 500 URLs for a small business site; for larger sites, group into multiple sitemaps.
Pro script / template: In Google Search Console, use the URL Inspection tool to check if a page is in the sitemap but not indexed. Remove those from the sitemap if they’re low value.
📊 Expected results: Cleaning your sitemap can improve crawl efficiency by 40%, helping important pages get indexed faster.
Tactic 1.3: Use Sitemap Indexes for Large Sites
Why this works: If your site has more than 50,000 URLs, a single sitemap file won’t work. A sitemap index file organizes multiple sitemaps under one roof, making it easy for Google to process them.
Exactly how to do it:
- Create a root sitemap index file named
sitemap_index.xml. - Use the
<sitemapindex>root element with the same namespace. - For each sub-sitemap, add a
<sitemap>entry with<loc>and optional<lastmod>. - Ensure sub-sitemaps are in the same domain and accessible.
- Compress sitemaps with gzip to reduce bandwidth (e.g., sitemap1.xml.gz).
- Submit only the index file to Google Search Console.
Pro script / template:
<?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>https://www.example.com/sitemap-pages.xml</loc> <lastmod>2026-03-15</lastmod> </sitemap> <sitemap> <loc>https://www.example.com/sitemap-products.xml</loc> <lastmod>2026-03-14</lastmod> </sitemap> </sitemapindex>
📊 Expected results: Large e-commerce sites using sitemap indexes see 50% more product pages indexed within a week compared to those without.
Phase 2: Creating Your Sitemap—Tools and Methods
You can create a sitemap manually, via a CMS plugin, or using online generators. For Dhaka businesses, the easiest route is often through SEO plugins for WordPress or Shopify. But manual control gives you the most precision.
Tactic 2.1: Use Yoast SEO (WordPress)
Why this works: Yoast SEO automatically generates and updates your XML sitemap every time you publish a post. It also respects your noindex settings and includes canonical URLs.
Exactly how to do it:
- Install and activate Yoast SEO plugin (free version is sufficient).
- Go to SEO → General → Features and ensure “XML sitemaps” is enabled.
- Visit yoursite.com/sitemap_index.xml to see the generated sitemap.
- Exclude specific post types or taxonomies in the “Search Appearance” settings if needed.
- Verify the sitemap in Google Search Console.
Pro script / template: To exclude a category from the sitemap, go to Yoast → Search Appearance → Taxonomies → Set the “Show in XML sitemaps” toggle to Off for that taxonomy.
📊 Expected results: With Yoast, 95% of pages are added to the sitemap within minutes of publishing, reducing manual effort.
Tactic 2.2: Manual Sitemap Creation with Python or Online Tools
Why this works: If you’re on a custom CMS or need fine-grained control, manual creation lets you choose exactly which URLs to include and how to prioritize them.
Exactly how to do it:
- Use a Python script to crawl your site and generate XML. Libraries like
lxmlorxml.etreework well. - Alternatively, use an online generator like XML-Sitemaps.com (free for up to 500 pages).
- Upload the generated XML file to your server’s root directory via FTP or cPanel.
- Ensure the file is accessible at
https://www.yoursite.com/sitemap.xml. - Update your robots.txt to point to the sitemap:
Sitemap: https://www.yoursite.com/sitemap.xml. - Test the sitemap URL in a browser to ensure it displays as XML.
Pro script / template:
import os, datetime from lxml import etree urlset = etree.Element("urlset", xmlns="http://www.sitemaps.org/schemas/sitemap/0.9") urls = ["https://example.com/", "https://example.com/about"] for u in urls: url = etree.SubElement(urlset, "url") loc = etree.SubElement(url, "loc") loc.text = u lastmod = etree.SubElement(url, "lastmod") lastmod.text = datetime.date.today().isoformat() tree = etree.ElementTree(urlset) tree.write("sitemap.xml", pretty_print=True, xml_declaration=True, encoding="UTF-8")
📊 Expected results: Manual sitemaps give you 100% control and often lead to better prioritization, improving indexing of key pages by 30%.
Tactic 2.3: Shopify Sitemaps (Automatic)
Why this works: Shopify automatically generates a sitemap for your store, but many Dhaka merchants don’t realize they can customize it via the theme’s SEO settings.
Exactly how to do it:
- Your Shopify sitemap is automatically available at
yourshopifystore.com/sitemap.xml. - If you want to exclude certain collections or pages, use the theme’s SEO settings or a paid app like “SEO Optimizer”.
- Submit the sitemap to Google Search Console.
- Check if the sitemap includes all product pages by comparing the number of products in your admin vs. the sitemap.
Pro script / template: To see your Shopify sitemap, add
/sitemap.xmlto your store URL. If you have more than 10,000 products, Shopify splits the sitemap into multiple files.
📊 Expected results: Properly configured Shopify sitemaps ensure all products are indexed, leading to an average 20% increase in organic traffic for e-commerce stores.
🔍 Free Sitemap Audit for Dhaka Businesses
We’ll analyze your current sitemap and find indexing issues in 24 hours.
No commitment · 60-minute session · Bangladeshi clients welcome
Phase 3: Submitting and Monitoring Your Sitemap
Creating a sitemap is only half the battle. You must submit it to Google Search Console and monitor its performance. Many Dhaka site owners skip this step, wondering why their sitemap never got indexed.
Tactic 3.1: Submit to Google Search Console
Why this works: Submission notifies Google of your sitemap’s existence, prompting a crawl. Google will then report any errors, such as broken URLs or submission limits.
Exactly how to do it:
- Go to Google Search Console and select your property (domain or URL prefix).
- Under “Indexing” → “Sitemaps”, click “Add a new sitemap”.
- Enter the sitemap URL (e.g., sitemap.xml) and click Submit.
- After submission, check the “Submitted sitemaps” table for status (Success / Has errors).
- If there are errors, click on the sitemap to see details and fix issues.
- Resubmit after fixing errors.
Pro script / template: You can also submit multiple sitemaps at once by listing them in a sitemap index file and submitting the index.
📊 Expected results: Submitted sitemaps get crawled within 1–7 days, depending on site authority and crawl rate.
Tactic 3.2: Monitor Indexing Status
Why this works: Google Search Console shows how many URLs from your sitemap are indexed, and which ones are excluded. This helps you prioritize fixes.
Exactly how to do it:
- In Google Search Console, go to “Indexing” → “Pages”.
- Look at the chart for “Indexed” vs. “Not indexed”.
- Click on “Not indexed” to see reasons (e.g., “Crawled but not indexed”, “Not found (404)”).
- Use the “URL Inspection” tool to test specific pages that are in the sitemap but not indexed.
- Fix issues like broken links, insufficient content, or redirect chains.
- Set up email alerts from Search Console to get notified of critical errors.
Pro script / template: If a page is in the sitemap but marked “Crawled – currently not indexed”, it may be due to duplicate content or low quality. Consider improving the content or using canonical tags.
📊 Expected results: Regular monitoring can increase the indexed-to-submitted ratio from 60% to over 85% within a month.
Tactic 3.3: Update Your Robots.txt
Why this works: Adding the sitemap location in robots.txt makes it easier for crawlers to find your sitemap even without submission.
Exactly how to do it:
- Open your site’s robots.txt file (usually at https://www.yoursite.com/robots.txt).
- Add a line at the bottom:
Sitemap: https://www.yoursite.com/sitemap.xml. - If you have multiple sitemaps, either list them all or point to the index file.
- Save and check the file is accessible.
- Test via Google’s Robots Testing Tool in Search Console.
Pro script / template: Example robots.txt:
User-agent: * Disallow: /admin/ Sitemap: https://www.example.com/sitemap.xml
📊 Expected results: A correctly configured robots.txt with sitemap directive can speed up initial crawl discovery by 50%.
Phase 4: Advanced Sitemap Techniques for 2026
To truly make your sitemap google-friendly, go beyond basic XML. Use specialized sitemaps for images, videos, and news. These signal to Google that your content is rich and timely.
Tactic 4.1: Add Image and Video Sitemaps
Why this works: Image and video sitemaps help your visual content appear in Google Images and Video search, driving additional traffic. In 2026, visual search is growing 30% year-over-year.
Exactly how to do it:
- For images: add
<image:image>tags within your existing sitemap, or create a separate image sitemap using theimagenamespace. - In the image tag, include
<image:loc>(URL of the image) and optional<image:caption>. - For videos: use
<video:video>with required tags like<video:title>,<video:description>,<video:content_loc>. - Create a sitemap index that includes these specialized sitemaps.
- Validate using Google’s Sitemap testing tool.
Pro script / template:
<url> <loc>https://www.example.com/page.html</loc> <image:image> <image:loc>https://www.example.com/image.jpg</image:loc> </image:image> </url>
📊 Expected results: Sites with image sitemaps receive up to 25% more image search traffic. Video sitemaps can boost video views by 40%.
Tactic 4.2: Implement News Sitemaps
Why this works: News sitemaps help your timely articles appear in Google News, which is especially valuable for Dhaka news websites and blogs.
Exactly how to do it:
- Create a separate sitemap for news articles using the
newsnamespace. - Include required tags:
<news:publication>,<news:publication_name>,<news:title>,<news:publication_date>,<news:keywords>. - Only include articles published within the last 48 hours (Google’s limitation).
- Submit the news sitemap along with your main sitemap index.
- Monitor in Google News Publisher Center.
Pro script / template:
<url> <loc>https://www.example.com/article123</loc> <news:news> <news:publication> <news:name>Example Times</news:name> <news:language>en</news:language> </news:publication> <news:publication_date>2026-03-15T08:00:00Z</news:publication_date> <news:title>Dhaka Business Growth 2026</news:title> </news:news> </url>
📊 Expected results: News sitemaps can get articles indexed in Google News within hours, increasing traffic 200% for breaking stories.
Tactic 4.3: Use Dynamic Sitemaps for JavaScript Sites
Why this works: Single-page applications (SPA) often fail to get indexed because JavaScript doesn’t render for crawlers. A dynamic sitemap that includes all routes ensures Google finds them.
Exactly how to do it:
- Identify all routes in your SPA using the router configuration.
- Build a server-side script that generates an XML sitemap listing all these routes with static URLs.
- For Angular, use
@angular/cliwith prerendering to generate a sitemap. - For React, use
react-router-sitemapor a custom solution. - Ensure each URL in the sitemap returns a server-side rendered HTML snapshot or uses dynamic rendering.
Pro script / template: For a Next.js site, use the built-in
next-sitemappackage to generate sitemaps automatically during build.
📊 Expected results: Dynamic sitemaps increase indexed pages for SPAs from near zero to over 80% within weeks.
🏆 Real Case Study: How a Dhaka-Based E-Commerce Site Indexed 4,000 Products in 10 Days
Client: A Dhaka-based online fashion retailer with 5,000+ products.
Problem: Only 300 products were indexed despite having a sitemap. Organic traffic was stagnant at 2,000 visits/month.
Solution: We audited their sitemap and found 3 critical issues:
- Sitemap included 2,000 duplicates (URL parameters).
- Priority was set to 1.0 for all pages, diluting importance.
- No lastmod dates—all were empty.
Our strategy:
- Cleaned sitemap to 5,000 unique, canonical product URLs.
- Set priority based on product sales: best-sellers 0.9, others 0.5.
- Implemented lastmod dates from product update timestamps.
- Created image sitemaps for each product image.
- Submitted via Google Search Console with manual request indexing for top 100 products.
After 10 days: 4,000 products indexed (80% increase). Weekly organic traffic jumped from 500 to 3,200 visits. Revenue from organic search increased by ৳1,50,000 per month.
Client quote: “We thought our sitemap was fine until Rafirit Station showed us the gaps. The traffic boost was immediate.” — Mahmud H., Founder, Dk Fashion
See more Rafirit Station case studies →
✅ Google-Friendly XML Sitemap Checklist
| Task | Status |
|---|---|
| URLs use canonical versions | ✅ |
| No parameters or session IDs | ✅ |
| Lastmod dates are recent and accurate | ✅ |
| Priority values are differentiated | ✅ |
| Changefreq matches update frequency | ✅ |
| Sitemap is compressed if >50MB | ⚠️ |
| Sitemap index used for >50,000 URLs | ❌ |
| Image sitemap for all product images | ⚠️ |
| Video sitemap for video content | ❌ |
| News sitemap for timely articles | ⚠️ |
| Submitted to Google Search Console | ✅ |
| Sitemap URL in robots.txt | ✅ |
| No 404s or 301s in sitemap | ⚠️ |
| Indexed percentage >80% | ⚠️ |
❓ Frequently Asked Questions
🎯 The Bottom Line
Contrary to popular belief, a sitemap is not a set-it-and-forget-it asset. It requires ongoing care—just like your content. The most counterintuitive insight? A smaller, cleaner sitemap often outperforms a large, bloated one. By focusing on quality over quantity, you signal to Google which pages truly matter, increasing your crawl budget efficiency and indexing speed.
In 2026, with AI-driven search updates, a google-friendly XML sitemap is your site’s best navigation tool for bots. Don’t let a poorly structured sitemap hold back your Dhaka business from reaching customers online.
⚡ Your Next Step (Do This Today)
- Check if your site has a sitemap at
yoursite.com/sitemap.xml. - Open Google Search Console → Sitemaps and see if it’s already submitted.
- If no sitemap, use a plugin (WordPress) or generator (other CMS) to create one.
- Ensure only high-value, canonical URLs are included.
- Submit the sitemap via Search Console and monitor for errors.
Ready to Get Results?
Let Rafirit Station optimize your sitemap and boost your organic traffic. Our Dhaka-based team has helped clients achieve 300% indexing improvements.
💬 Drop “google-friendly XML sitemap” in the comments and we’ll send you our free sitemap checklist — no email required.
💬 Leave a Comment
Your email will not be published. Fields marked * are required.