How to create a Google-friendly XML sitemap for your site | Rafirit Station Google-Friendly XML Sitemap: How to Create One (2026)
SEO

How to create a Google-friendly XML sitemap for your site

A Google-friendly XML sitemap helps search engines find and index your pages faster. In 2026, proper sitemap structure is more critical than ever for Dhaka businesses to compete online.

Performance Marketing Expert
Rafirit Station
📅 July 4, 2026
17 min read
🔍
📋 Table of Contents


    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)


    🔗 Rafirit Station Services


    🚀 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:

    1. Use <urlset> as the root element with the correct namespace (http://www.sitemaps.org/schemas/sitemap/0.9).
    2. For each URL, enclose in <url> tags.
    3. Add <loc> (required) with the full canonical URL.
    4. Add <lastmod> with the date of last modification in W3C format (e.g., 2026-03-15).
    5. Add <changefreq> (optional) — values: always, hourly, daily, weekly, monthly, yearly, never.
    6. Add <priority> (optional) — from 0.0 to 1.0, default 0.5.
    7. 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:

    1. Identify all URLs on your site that return 200 but have no indexable content (e.g., tag pages, filtered search results).
    2. Use a tool like Screaming Frog to crawl your site and export URLs.
    3. Remove any URL that uses tracking parameters (utm_source, etc.) from the sitemap.
    4. Exclude pages blocked by robots.txt, noindex tags, or canonicalized to another page.
    5. 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:

    1. Create a root sitemap index file named sitemap_index.xml.
    2. Use the <sitemapindex> root element with the same namespace.
    3. For each sub-sitemap, add a <sitemap> entry with <loc> and optional <lastmod>.
    4. Ensure sub-sitemaps are in the same domain and accessible.
    5. Compress sitemaps with gzip to reduce bandwidth (e.g., sitemap1.xml.gz).
    6. 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:

    1. Install and activate Yoast SEO plugin (free version is sufficient).
    2. Go to SEO → General → Features and ensure “XML sitemaps” is enabled.
    3. Visit yoursite.com/sitemap_index.xml to see the generated sitemap.
    4. Exclude specific post types or taxonomies in the “Search Appearance” settings if needed.
    5. 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:

    1. Use a Python script to crawl your site and generate XML. Libraries like lxml or xml.etree work well.
    2. Alternatively, use an online generator like XML-Sitemaps.com (free for up to 500 pages).
    3. Upload the generated XML file to your server’s root directory via FTP or cPanel.
    4. Ensure the file is accessible at https://www.yoursite.com/sitemap.xml.
    5. Update your robots.txt to point to the sitemap: Sitemap: https://www.yoursite.com/sitemap.xml.
    6. 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:

    1. Your Shopify sitemap is automatically available at yourshopifystore.com/sitemap.xml.
    2. If you want to exclude certain collections or pages, use the theme’s SEO settings or a paid app like “SEO Optimizer”.
    3. Submit the sitemap to Google Search Console.
    4. 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.xml to 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.


    🗓 Get a Free Sitemap Audit →

    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:

    1. Go to Google Search Console and select your property (domain or URL prefix).
    2. Under “Indexing” → “Sitemaps”, click “Add a new sitemap”.
    3. Enter the sitemap URL (e.g., sitemap.xml) and click Submit.
    4. After submission, check the “Submitted sitemaps” table for status (Success / Has errors).
    5. If there are errors, click on the sitemap to see details and fix issues.
    6. 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:

    1. In Google Search Console, go to “Indexing” → “Pages”.
    2. Look at the chart for “Indexed” vs. “Not indexed”.
    3. Click on “Not indexed” to see reasons (e.g., “Crawled but not indexed”, “Not found (404)”).
    4. Use the “URL Inspection” tool to test specific pages that are in the sitemap but not indexed.
    5. Fix issues like broken links, insufficient content, or redirect chains.
    6. 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:

    1. Open your site’s robots.txt file (usually at https://www.yoursite.com/robots.txt).
    2. Add a line at the bottom: Sitemap: https://www.yoursite.com/sitemap.xml.
    3. If you have multiple sitemaps, either list them all or point to the index file.
    4. Save and check the file is accessible.
    5. 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:

    1. For images: add <image:image> tags within your existing sitemap, or create a separate image sitemap using the image namespace.
    2. In the image tag, include <image:loc> (URL of the image) and optional <image:caption>.
    3. For videos: use <video:video> with required tags like <video:title>, <video:description>, <video:content_loc>.
    4. Create a sitemap index that includes these specialized sitemaps.
    5. 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:

    1. Create a separate sitemap for news articles using the news namespace.
    2. Include required tags: <news:publication>, <news:publication_name>, <news:title>, <news:publication_date>, <news:keywords>.
    3. Only include articles published within the last 48 hours (Google’s limitation).
    4. Submit the news sitemap along with your main sitemap index.
    5. 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:

    1. Identify all routes in your SPA using the router configuration.
    2. Build a server-side script that generates an XML sitemap listing all these routes with static URLs.
    3. For Angular, use @angular/cli with prerendering to generate a sitemap.
    4. For React, use react-router-sitemap or a custom solution.
    5. 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-sitemap package 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:

    1. Cleaned sitemap to 5,000 unique, canonical product URLs.
    2. Set priority based on product sales: best-sellers 0.9, others 0.5.
    3. Implemented lastmod dates from product update timestamps.
    4. Created image sitemaps for each product image.
    5. 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

    Q: What is a Google-friendly XML sitemap?

    A Google-friendly XML sitemap follows the Sitemaps Protocol, includes only canonical URLs, uses proper priority and changefreq, excludes low-value pages, and is submitted via Google Search Console. It helps Google discover and index your content efficiently. A well-made sitemap can improve indexing speed by up to 35%.

    Q: How often should I update my sitemap?

    Update your sitemap every time you add, remove, or significantly update a page. For dynamic sites, automate sitemap generation via CMS plugins or scripts. Google recommends updating at least manually once a week. Automated updates ensure you never miss a new page.

    Q: Can I have multiple sitemaps?

    Yes, especially if your site has more than 50,000 URLs or different content types. Use a sitemap index file to organize them. Google supports up to 500 sitemaps in a single index. This is common for large e-commerce or news sites.

    Q: What is the maximum size of a sitemap?

    A sitemap file cannot exceed 50MB (uncompressed) or 50,000 URLs. If your file exceeds either limit, you must split it into multiple sitemaps and list them in a sitemap index file. Compressing with gzip can reduce size by 70%.

    Q: Do I need a sitemap if I have a small site?

    Yes, even small sites benefit. A sitemap helps Google discover all pages, especially if internal linking is limited. For a Dhaka small business with 20 pages, a sitemap can ensure every page gets indexed within days instead of weeks. It’s a low-effort, high-impact SEO task.

    Q: How do I check if my sitemap has errors?

    Use Google Search Console’s Sitemaps report. It shows success counts, errors, and warnings. You can also use online validators like the one at xml-sitemaps.com. Common errors include invalid XML formatting, URLs returning 404, and missing required tags.

    Q: Does Rafirit Station offer XML sitemap services?

    Absolutely. We provide sitemap audits, creation, and submission as part of our SEO services. Our team in Dhaka can help optimize your sitemap for better indexing. Book a free consultation.


    🎯 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)

    1. Check if your site has a sitemap at yoursite.com/sitemap.xml.
    2. Open Google Search Console → Sitemaps and see if it’s already submitted.
    3. If no sitemap, use a plugin (WordPress) or generator (other CMS) to create one.
    4. Ensure only high-value, canonical URLs are included.
    5. 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.


    🗓 Book Your Free Strategy Call →

    💬 Drop “google-friendly XML sitemap” in the comments and we’ll send you our free sitemap checklist — no email required.

    🔍
    Want to rank #1 on Google for your target keywords?
    +340% avg. organic traffic
    Get Free SEO Audit → 💬 Or WhatsApp us now

    💬 Leave a Comment

    Your email will not be published. Fields marked * are required.

    Ready to Apply This?

    Need Expert Help With Your
    SEO?

    Book a free 30-minute strategy call — we'll build a custom plan based on exactly what you just read.