What a sitemap does and why you need one

A sitemap is a file that lists every page on your website in a format that search engines can read. It tells Google, Bing, and other search engines where to find all your content, how often pages change, and which pages matter most to you. Think of it as a table of contents for your site, but written in a language machines understand instead of people.

You need a sitemap because search engines don't always find every page on their own, especially if your site is new, large, or has pages that don't link to each other well. A sitemap speeds up discovery and helps search engines crawl your site more efficiently. It does not may provide your pages will rank higher — that depends on content quality and other factors — but it removes a common reason why pages go undiscovered.

Most websites benefit from having a sitemap, whether they are small blogs or large e-commerce sites. The file itself is invisible to visitors; it exists only for search engines.

Key Takeaways

  • A sitemap is an XML file that lists your website's pages and tells search engines where to find your content.
  • You can create a sitemap manually by writing XML code, or use free tools like Screaming Frog, XML-Sitemaps.com, or your website platform's built-in generator.
  • After creating your sitemap, save it as sitemap.xml in your website's root directory and submit it to Google Search Console and Bing Webmaster Tools.
  • Update your sitemap whenever you add or remove pages, or set it to regenerate automatically if your site platform supports it.

Two types of sitemaps: XML and HTML

An XML sitemap is the standard format for search engines. It uses structured tags to describe each page, when it was last updated, how often it changes, and its importance relative to other pages. This is the type search engines expect and the one you should prioritize.

An HTML sitemap is a regular web page that lists links to your site's main sections and pages. It is meant for visitors, not search engines, and helps people navigate your site if they cannot find what they want through your menu. You can have both — they serve different purposes and do not conflict.

This guide focuses on XML sitemaps because that is what search engines use. If you create an XML sitemap, you do not need an HTML one, though many sites include both.

Creating a sitemap with free online tools

The fastest way to create a sitemap is to use a free generator tool. XML-Sitemaps.com is one of the most straightforward: go to the site, enter your domain name in the box, and click "Start". The tool crawls your website, finds all your pages, and generates an XML sitemap file. When it finishes, click "Download your sitemap.xml file" and save it to your computer.

Screaming Frog SEO Spider is another option, especially if you want more control. Download the free version, enter your domain, and let it crawl your site. Once finished, go to Sitemaps in the menu and export as XML. This tool also shows you broken links and other technical issues while it crawls.

If your website runs on a platform like WordPress, Shopify, Wix, or Squarespace, check your settings first — most platforms generate sitemaps automatically. In WordPress, install the Yoast SEO or Rank Math plugin, enable the sitemap feature in settings, and the plugin creates and updates it for you. On Shopify, go to Settings > Online Store > Sitemap and the file is already live at yoursite.com/sitemap.xml.

Creating a sitemap by hand with XML code

If you prefer to write the sitemap yourself or have a very small site, you can create an XML file manually. Open a text editor (Notepad on Windows, TextEdit on Mac), and start with this structure:

<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://yoursite.com</loc> <lastmod>2024-01-15</lastmod> <changefreq>weekly</changefreq> <priority>1.0</priority> </url> </urlset>

Replace https://yoursite.com with your actual domain. The lastmod tag is the date you last updated that page (use YYYY-MM-DD format). The changefreq tag tells search engines how often the page typically changes — use "weekly" for a blog, "monthly" for static pages, or "daily" for pages that update constantly. The priority tag is a number from 0.0 to 1.0 that tells search engines which pages matter most to you (1.0 is highest). Add one <url> block for each page on your site.

Save the file as sitemap.xml (not sitemap.txt), then upload it to your website's root directory — the main folder where your homepage lives. If you use FTP or a file manager through your hosting provider, drag sitemap.xml to the root folder.

Submitting your sitemap to search engines

Creating a sitemap is only half the work. You also need to tell search engines where to find it. Google Search Console is the main tool for this. Go to search.google.com/search-console, sign in with your Google account, and add your website if you have not already. Click "Sitemaps" in the left menu, paste the full URL to your sitemap (usually https://yoursite.com/sitemap.xml), and click Submit.

Bing Webmaster Tools works the same way. Go to bing.com/webmasters, sign in, add your site, and submit your sitemap URL in the Sitemaps section. Submitting to both ensures your pages have the best chance of being found.

You can also tell search engines about your sitemap by adding a line to your robots.txt file (a file that lives in your root directory alongside sitemap.xml). Add this line: Sitemap: https://yoursite.com/sitemap.xml. This is optional if you submit through Search Console and Bing Webmaster Tools, but it is a good backup.

Keeping your sitemap up to date

A sitemap is only useful if it reflects your actual website. When you add new pages, remove old ones, or significantly change existing pages, your sitemap should change too. If you used a tool like Yoast SEO or Rank Math in WordPress, the plugin updates your sitemap automatically every time you publish or delete a post — you do not need to do anything.

If you generated your sitemap with an online tool or wrote it by hand, regenerate it every few months or whenever you make major changes to your site structure. Use the same tool you used before, download the new file, and upload it to your root directory, replacing the old one. Then go back to Google Search Console and Bing Webmaster Tools and re-submit the URL — they will fetch the updated version.

For large sites that change frequently, consider using a plugin or platform feature that regenerates the sitemap automatically. This removes the need to remember to update it yourself.

Frequently Asked Questions

Do I need a sitemap if my site is small?

A sitemap helps even small sites, especially if pages do not link to each other well or if your site is brand new. It takes only a few minutes to create and costs nothing, so it is worth doing. If your site has fewer than 50 pages, an online tool will generate one in seconds.

Will a sitemap improve my search rankings?

A sitemap does not directly boost rankings. It helps search engines find and crawl your pages faster, which is a small advantage. Rankings depend mainly on content quality, relevance, and links from other sites. A sitemap removes a barrier to discovery but does not replace good content.

What is the difference between priority and changefreq tags?

Priority tells search engines which pages matter most to you on a scale of 0.0 to 1.0 — use 1.0 for your homepage and main pages, 0.8 for important content, and 0.5 for less critical pages. Changefreq is a hint about how often a page typically updates — "daily" for news, "weekly" for blogs, "monthly" for static pages. Search engines use these as suggestions, not rules.

Can I have more than one sitemap?

Yes. If your site has more than 50,000 URLs, you must split it into multiple sitemaps and create a sitemap index file that lists them all. Most small and medium sites fit in a single sitemap. Your platform or tool will handle this automatically if needed.

What if I cannot access my root directory?

If your hosting provider does not give you FTP or file manager access, use your website platform's built-in sitemap feature instead. WordPress, Shopify, Wix, and Squarespace all generate sitemaps without requiring you to upload files manually. If you use a custom site builder with no sitemap feature, contact your hosting provider — most can upload the file for you.