Last updated: November 2026
A new website can have excellent pages and still be slow to appear in Google, simply because Google has not found them yet. An XML sitemap helps with this. It is a list of the pages that you want search engines to know about. This guide explains what a sitemap is, how to create one, how to submit it to Google, and which mistakes to avoid.
An XML sitemap is a file that lists the important addresses (URLs) of your website. Search engines read it to discover pages and to see when they were last changed. It is usually found at an address like https://www.example.com/sitemap.xml.
A very small sitemap looks like this:
<?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-11-01</lastmod>
</url>
<url>
<loc>https://www.example.com/contact</loc>
</url>
</urlset>
Each page is one url entry. Only the loc tag, which holds the address, is required. The lastmod tag is optional and shows the date when the page was last changed.
Google can find most pages by following links, so a sitemap is not required. It helps most when:
A sitemap does not guarantee that a page will be indexed or ranked. It only helps search engines find it. Google still decides which pages are worth including.
Include only pages that you want people to find in search results. Each address should:
Leave out error pages, redirected addresses, duplicate pages, login pages, and internal search result pages.
The sitemap standard also has changefreq and priority tags. Google mostly ignores both, so you do not need to spend time on them. The lastmod date can help, but only if it is honest. Change it when the content of the page really changes, not every time the file is generated.
You have three common options:
/wp-sitemap.xml, and SEO plugins such as Yoast or Rank Math create their own. Most modern website builders also create one automatically.If you use a generator, upload the saved file to the root folder of your website, usually public_html, and name it sitemap.xml.
sitemap.xml.After a short time the report shows a status. "Success" means that Google read the file. "Couldn't fetch" or "Has errors" means that something is wrong, and the report explains what.
Add one line to your robots.txt file with the full address of your sitemap:
Sitemap: https://www.example.com/sitemap.xml
This lets any search engine that reads your robots.txt find the sitemap. If you need help with that file, read our guide on what a robots.txt file is and how to create one. Google no longer supports the old method of "pinging" a sitemap address, so submitting in Search Console and listing it in robots.txt are the ways to go.
&, and the file must be saved as UTF-8.Besides the standard page sitemap, there are special sitemaps for images, videos, and news. They are optional and useful only if those content types are important for your site.
Whenever you add, remove, or move pages. A CMS or plugin can do this automatically.
Yes. You can submit your sitemap in Bing Webmaster Tools as well.
Yes. Large websites often use several, together with a sitemap index file.
A sitemap only helps Google find pages. Pages may still be left out if they are new, thin, duplicated, or blocked. Check them with the URL Inspection tool in Search Console.
Create your file with our XML Sitemap Generator, submit it in Search Console, and check once a month that the report shows no errors.