By SitemapFixer Team
Updated April 2026

How to Create a Sitemap: Step-by-Step Guide

Validate your sitemap after creation - freeCheck My Sitemap

WordPress

Install the Yoast SEO or Rank Math plugin. Both automatically generate a sitemap at yoursite.com/sitemap_index.xml and keep it updated as you publish content. In Yoast: go to SEO then General then Features and enable XML sitemaps. In Rank Math: go to Rank Math then Sitemap settings. Submit the sitemap URL to Google Search Console after setup.

Shopify

Shopify generates your sitemap automatically at yourstore.com/sitemap.xml. No setup required. The sitemap updates when you add products, pages, blog posts, or collections. Submit the sitemap URL directly to Google Search Console. If you need to exclude certain URLs, use the Shopify sitemap apps from the App Store.

Next.js

In Next.js 13+ with App Router, create src/app/sitemap.ts that exports a default function returning an array of sitemap entries. Each entry needs a url and optionally lastModified, changeFrequency, and priority. Next.js serves this at /sitemap.xml automatically. For large sites, use generateSitemaps to create multiple sitemap files.

Static or custom sites

For static sites or frameworks without built-in sitemap support, use the free online XML Sitemap Generator or SitemapFixer to crawl your site and generate a sitemap automatically. Download the generated sitemap.xml and place it in your site root directory. Update it manually when you add significant new pages, or automate generation in your deployment pipeline.

After creating your sitemap

Submit your sitemap to Google Search Console by going to Indexing then Sitemaps, entering your sitemap URL, and clicking Submit. Also declare your sitemap in your robots.txt file by adding Sitemap: https://yoursite.com/sitemap.xml at the bottom. Verify the sitemap was processed without errors in Search Console within 24-48 hours.

Validate your sitemap after creating it
Free - checks all URLs in 60 seconds
Check My Sitemap Free

Related Guides