XML sitemap best practices Key Takeaways
Creating an XML sitemap is a foundational SEO step, but doing it right requires more than just generating a file.
- Follow XML sitemap best practices to prioritize high-value pages and avoid wasting crawl budget on thin or duplicate content.
- Keep your sitemap under 50 MB and under 50,000 URLs per file, using a sitemap index if needed.
- Regularly monitor sitemap submission status in Google Search Console and Bing Webmaster Tools to catch errors quickly.

Why XML sitemap best practices Matter for SEO
An XML sitemap acts as a roadmap for search engine crawlers, guiding them to the pages you want indexed. When implemented correctly, it ensures that new or updated content is discovered quickly, especially on large sites or sites with poor internal linking. Without a properly optimized sitemap, even great content can remain hidden in search results for weeks or months.
Following XML sitemap best practices also helps you control your crawl budget. By explicitly listing only canonical, indexable pages, you tell Googlebot exactly where to spend its time. This reduces wasted crawling on duplicate pages, parameter-based URLs, or low-value archives. For a related guide, see 7 Proven Technical SEO Best Practices for 2026 (Expert Guide).
1. Include Only Canonical, Indexable Pages
Your sitemap should contain only URLs that you want indexed in the SERPs. Exclude non-canonical versions, paginated pages that are not the main content, and URLs blocked by noindex directives or robots.txt. Including these can confuse crawlers and dilute your crawl budget.
Checklist for choosing sitemap URLs:
- Only list the canonical URL for each page.
- Skip URLs with
rel="canonical"pointing elsewhere. - Do not add URLs blocked by
robots.txtor taggednoindex. - Avoid session IDs, tracking parameters, and sort filters.
2. Use a Sitemap Index File for Large Sites
If your site has more than 50,000 URLs or your sitemap file exceeds 50 MB (uncompressed), create a sitemap index file. This is a top-level file that lists multiple child sitemaps. It keeps your sitemap manageable and allows you to organize by content type (e.g., products, blog posts, categories).
Google supports sitemap index files with up to 50,000 child sitemaps, so you can scale your site without losing crawl efficiency.
3. Prioritize Your Most Important Pages with <priority>
The <priority> tag (0.0 to 1.0) lets you hint at a page’s relative importance. Homepages and key landing pages should get 0.9 or 1.0, while less critical pages can be 0.3–0.5. Use this tag sparingly—assigning 1.0 to every page defeats its purpose. Also, the <changefreq> tag is largely ignored by Google, so focus your effort on <priority> and accurate <lastmod> dates.
4. Keep <lastmod> Dates Accurate and Updated
Google uses the <lastmod> value to prioritize recrawling. If you mark a page as last modified yesterday, but nothing changed, you risk losing trust. Use a dynamic system that updates the timestamp only when the actual page content changes. This is especially important for news sites, blogs, and e-commerce product pages.
5. Submit Your Sitemap to Search Consoles
Once your sitemap is live, submit it directly to Google Search Console and Bing Webmaster Tools. Do not rely solely on the robots.txt directive. Submitting manually gives you immediate feedback on errors, indexed count, and warnings. Check the submission report weekly to catch issues like “URL not accessible” or “redirect error”.
How to submit:
- In Google Search Console, go to Sitemaps → Add a new sitemap → Enter the URL path → Submit.
- In Bing Webmaster Tools, use the Sitemaps section similarly.
6. Compress and Host Your Sitemap at the Root
Always compress your sitemap with gzip (e.g., sitemap.xml.gz) to reduce bandwidth and speed up crawling. Host the file at the root of your domain (e.g., https://seomafiaclub.com not in a subfolder, unless your site uses subdomains for separate content. For subdomain-specific sitemaps, place them in that subdomain’s root.
7. Use Video, Image, and News Sitemaps Where Relevant
If your site contains lots of videos, images, or news articles, create specialized sitemaps. Video sitemaps can include thumbnails, durations, and live status. Image sitemaps help Google discover images that may not be linked internally well. News sitemaps are required for inclusion in Google News. These extended sitemaps follow the same XML sitemap best practices but add extra tags for richer indexing.
8. Monitor for Crawl Errors and Indexation Issues
After submission, regularly review the “URL errors” section in Google Search Console. Common errors include 404s, server errors, and redirected URLs. Each error reduces the efficiency of your sitemap. Remove or fix the offending URLs and update your sitemap accordingly. Also, watch for spikes in “Submitted URL not indexed” warnings—they may point to quality issues or server problems.
9. Avoid Mixing HTTP and HTTPS
Your sitemap should contain only HTTPS URLs if your site runs on HTTPS. Mixed protocols confuse crawlers and can cause indexation issues. If you’ve migrated from HTTP to HTTPS, update your sitemap completely and remove old HTTP versions. Use 301 redirects on the old URLs and resubmit the sitemap. For a related guide, see URL Structure Best Practices: How to Build Clean, Hierarchical URLs That Rank.
10. Refresh Your Sitemap Regularly (Not Just Automatically)
Many CMS plugins regenerate sitemaps automatically, but it’s wise to occasionally review the generated file manually. Look for orphaned pages, outdated entries, or accidental inclusions. For large sites, schedule a monthly review. This ensures your sitemap remains a reliable, up-to-date representation of your site’s best content.
Common Mistakes to Avoid with XML Sitemaps
Even seasoned SEOs slip up sometimes. Here are the most frequent errors:
- Including thin or duplicate pages – This wastes crawl budget and dilutes index quality.
- Using wrong or missing namespace attributes – Validate your sitemap against
http://www.sitemaps.org/schemas/sitemap/0.9. - Forgetting to update after URL changes – A stale sitemap misleads crawlers.
- Placing the sitemap in a blocked directory – Ensure the file is publicly accessible.
- Ignoring error reports – Unaddressed errors compound over time.
SEO Entities and Their Functions
Understanding the key entities involved in sitemap optimization helps you align technical decisions with broader SEO strategy:
- Technical SEO Entities (crawl issues, indexability status) – These include crawl errors,
robots.txtblocks, andnoindextags that determine whether a URL is eligible for sitemap inclusion. - Metrics Entities (organic traffic, crawl budget, index coverage) – Metrics like indexed vs. submitted URLs in Search Console help you measure sitemap effectiveness and spot anomalies.
- Page Entities (top pages, broken pages, canonical URLs) – Identifying your best-performing and most-linked pages ensures you prioritize the right URLs in your sitemap.
- SERP Entities (sitelinks, video results, image carousels) – Using specialized sitemaps for video and image content can trigger richer SERP features and increase visibility.
Useful Resources
For deeper reading on sitemap creation and troubleshooting, check these official guides:
- Google’s official XML Sitemap documentation – The definitive reference on sitemap structure, limits, and best practices.
- Bing Webmaster Tools Sitemap help – Covers sitemap submission and nuances for Bing.
Frequently Asked Questions About XML sitemap best practices
What is an XML sitemap?
An XML sitemap is a file that lists a website’s important URLs, helping search engines discover and crawl them efficiently.
Why do I need to follow XML sitemap best practices?
Following best practices ensures crawlers find your best content quickly, avoid wasting time on low-value pages, and index what matters most.
How often should I update my XML sitemap?
Update your sitemap every time you add, remove, or significantly change important pages. For dynamic sites, automate this with a plugin or script.
What is the maximum size of an XML sitemap?
A single sitemap can contain up to 50,000 URLs and be no larger than 50 MB uncompressed. Use a sitemap index for larger sites.
Should I include noindex pages in my sitemap?
No. Including noindex pages in your sitemap sends conflicting signals to search engines. Only list indexable, canonical URLs.
What is a sitemap index file?
A sitemap index is a file that lists multiple child sitemaps. It’s used when you exceed the 50,000 URL or 50 MB limit.
How do I submit my sitemap to Google?
Go to Google Search Console, click on Sitemaps in the left sidebar, enter the sitemap URL, and click Submit.
What does the and lt;priority and gt; tag do?
The <priority> tag hints at a page’s relative importance (0.0–1.0). Google may use it to decide which pages to crawl first.
Is the and lt;changefreq and gt; tag important?
Google largely ignores <changefreq>. It’s better to focus on accurate <lastmod> dates and a clean sitemap structure.
Can I have multiple sitemaps on one site?
Yes, and it’s common to create separate sitemaps for different content types (pages, posts, products, images, videos).
Do XML sitemaps help with ranking?
Not directly, but they improve crawl efficiency and indexation, which can lead to better visibility for your content.
Should I compress my sitemap with gzip?
Yes, compressing reduces bandwidth usage and speeds up crawling. Name the file sitemap.xml.gz.
Where should I place the sitemap file?
Place it in the root directory of your domain (e.g., https://seomafiaclub.com
What is a video sitemap?
A video sitemap is a specialized XML sitemap that includes metadata like video title, description, duration, and thumbnail URL.
How often should I check my sitemap for errors?
Check at least weekly in Google Search Console. Promptly fix any errors like 404s or server issues.
Can I include URLs from different domains in one sitemap?
No. Each sitemap should only include URLs from the domain (or subdomain) it is hosted on.
What happens if my sitemap contains redirects?
Including redirected URLs in your sitemap is wasteful. Always list the final canonical URL.
Do I need a sitemap for a small site?
Even small sites benefit from a sitemap, especially if internal linking is sparse or if you want to ensure new content is indexed quickly.
How do I create an XML sitemap in WordPress?
Use plugins like Yoast SEO, Rank Math, or Google XML Sitemaps. They generate and update your sitemap automatically.
Should I use HTTPS or HTTP URLs in my sitemap?
Always use HTTPS URLs if your site supports HTTPS. Never mix protocols in the same sitemap.



