How to Create an XML Sitemap for Your Website

09/26/2026

How to create an XML sitemap for your website

An XML sitemap is a file made for search engines. It lists the pages of your website in one place. It helps search engines find and read your content. It does not promise rankings but it helps discovery.

Websites grow messy over time. Menus and links can leave pages buried. A sitemap makes sure no good page stays hidden. It is a simple file with real value.

What an XML sitemap looks like

The file uses a format called XML. It lists the address of each page. It can note when each page was last updated. Search engines read it like a map of your site.

Sitemaps have firm size limits. One file can hold fifty thousand addresses. It must stay under fifty megabytes when uncompressed. Large sites split their pages across several files.

Visitors never see this file. It sits quietly on your server. Only crawlers and site owners use it. That is why many owners forget it exists.

Why your site needs a sitemap

New sites benefit the most. They have few outside links pointing in. Search engines may not find their pages otherwise. A sitemap points crawlers to every page.

Large sites need one too. Thousands of pages are easy to miss. Deep pages may sit far from the home page. A sitemap shortens the path to each one.

How to create a sitemap step by step

Making a sitemap takes only a few minutes. Follow these steps in order. You do not need coding skills. A free tool does the hard work.

  1. List the pages you want search engines to index.
  2. Leave out thin pages and near duplicate pages.
  3. Generate the file with our free XML sitemap generator.
  4. Save the file as sitemap.xml in your root folder.
  5. Open the file address in a browser to confirm it loads.

Keep the list clean from the start. Only include pages you are proud of. Skip login pages and thank you pages. Skip test pages that were never meant to rank.

How to submit your sitemap to Google

Creating the file is only half the job. You should also tell Google where it is. Submission takes a few minutes inside Search Console. Google will then crawl the listed pages.

  1. Open Google Search Console and add your site.
  2. Verify that you own the site.
  3. Open the sitemaps section in the left menu.
  4. Type sitemap.xml and press the submit button.
  5. Wait a few days and check the coverage report.

After a week check which pages got indexed. Our Google index checker shows the index status of your pages. Pages that stay out may need better internal links.

How to keep your sitemap fresh

A stale sitemap slowly loses its value. New pages should be added soon after launch. Deleted pages should be removed from the list. Search engines trust sitemaps that match the live site.

Many platforms can update the file for you. Some plugins rebuild it each time you publish. If you built it by hand then set a monthly reminder. Regenerate the file after big site changes.

Keep your sitemap and your crawl rules in sync. Never list pages that your robots file blocks. Build a clean robots.txt file so the two files agree with each other.

Common sitemap mistakes to avoid

Small errors can waste the whole effort. Watch out for these common faults. Fix them as soon as you spot them. A clean sitemap works far better.

Frequently asked questions

Whether a sitemap guarantees that pages get indexed

A sitemap does not promise indexing. A sitemap only asks for a crawl. Google still decides what to index. Good content and links raise your chances.

How often a sitemap should be updated

Update it whenever your pages change. Blogs can update it with each new post. Static sites can review it once a month. Stale entries should be removed quickly.

Whether small sites need a sitemap

Most small sites still benefit from one. It costs little time to create. It helps new pages get found faster. There is no real downside.

Where the sitemap file should live

It should live in the root folder. That means right after your domain name. Search engines look there first. Deeper paths can cause confusion.

Whether images and videos belong in a sitemap

Images and videos can be included. Image and video sitemaps exist for this. They help media rich pages get found. Most text blogs do fine with a page sitemap.

Create your sitemap this week and submit it. Then watch your index coverage grow. Read more SEO guides to keep improving your site step by step.