An XML sitemap is a file that lists the pages you want search engines to find, with the date each one last changed. A small, well-linked site can live without one. For most business sites it is quick to set up, so there is little reason to skip it. This guide covers what goes in the file, how to make and submit one, and the bigger rules if your site has thousands of pages.
What is an XML sitemap?
It is a plain text file, usually at yourdomain.com/sitemap.xml, that lists the URLs on your site you want in Google and Bing. Each entry can carry a few extra details, such as when the page last changed. Search engines read it as a list of suggestions: Google calls a sitemap "merely a hint", and listing a page "doesn't guarantee" it gets crawled or indexed.
Inside the file, the whole list sits in one <urlset> tag. Each page gets its own <url> entry, which holds the page address in <loc> and, ideally, the date it last changed in <lastmod>. Open any sitemap in your browser, such as yourdomain.com/sitemap.xml, and you will see that pattern repeated once per page.
Does my site need one?
Google's own guidance says you may not need a sitemap if your site is small (about 500 pages or fewer), every page is linked from somewhere else on the site, and you don't rely on lots of video, images or news pages. You probably do need one if:
- the site is large
- the site is new and few other sites link to it yet
- you publish a lot of video or images, or appear in Google News
Most CMS platforms make one for you anyway, so the real question is usually whether the one you have is any good.
Which tags matter, and which does Google ignore?
<loc>: the full URL of the page. Required, and Google uses it.<lastmod>: when the page last changed in a meaningful way. Google uses it if it is consistently accurate.<changefreq>: how often you say the page changes. Google ignores it.<priority>: how important you say the page is. Google ignores it.
The useful one is <lastmod>. Google uses it to decide when to recrawl pages it already knows about, but only if the dates are honest. If every page shows today's date each time you rebuild the site, Google learns to ignore it. Change the date when the content changes, not when you fix a typo in the footer.
How do I create an XML sitemap?
- Use what your platform already has. WordPress makes one at
/wp-sitemap.xml, and plugins such as Yoast SEO and Rank Math add their own. Shopify and Wix build one automatically. Next.js sites can generate it from asitemap.tsfile, which is how this site does it. - For a custom site, crawl it. A crawler such as Screaming Frog can export a sitemap of every page it finds.
- List only pages you want in Google. Leave out redirects, broken pages, duplicates, pages marked noindex, filtered or search result URLs, and anything blocked in robots.txt.
- Use full, final URLs. Write
https://www.example.ie/page, not/page, and use the version your canonical tags point to. - Save it as UTF-8. That is the encoding Google requires.
How do I submit it to Google and Bing?
- Google Search Console: open the Sitemaps report, enter the sitemap URL and submit. The report shows whether Google could read it and how many URLs it found.
- Bing Webmaster Tools: add it under Sitemaps. Bing also supports IndexNow, which tells it straight away when a page is added or changed. We use IndexNow on this site.
- robots.txt: add a line anywhere in the file, such as
Sitemap: https://www.example.ie/sitemap.xml. Any crawler that reads robots.txt can then find it.
One thing to stop doing: "pinging" Google with your sitemap URL. Google deprecated the ping endpoint in June 2023 and it now returns an error.
What changes for large websites?
One sitemap file can hold at most 50,000 URLs or 50MB uncompressed. Past that, split it:
- Use a sitemap index. This is a small file that lists your other sitemaps. You submit the index once and Google finds the rest.
- Split by type. For example one sitemap for products, one for categories and one for blog posts. It also makes Search Console easier to read, because you can see which section has indexing problems.
- Generate it automatically. On a shop or news site the page list changes daily. Build the sitemap from your database or CMS so new pages appear and deleted pages drop out without anyone touching it.
- Keep it clean as you grow. Large sites collect redirects, expired products and parameter URLs. A sitemap full of them wastes crawling on pages you don't want indexed.
Common sitemap mistakes
- Listing URLs that redirect or return a 404
- Listing pages that are noindexed or blocked in robots.txt
- Mixing
httpandhttps, orwwwand non-www, versions of the same page - Setting every
<lastmod>to the build date - Forgetting to update it after a redesign or migration, so old URLs stay in and new ones never appear
The Search Console Sitemaps and Page indexing reports will flag most of these. Check them after any big change to the site.
Not sure your sitemap is helping?
If pages are missing from Google and you can't tell why, we can look at your sitemap, Search Console and site structure together. Book a free SEO audit and we will tell you what is stopping your pages from being indexed.
Related Services
- SEO Audit Dublin: find out why pages are not indexed
- Web Design Agency: websites built with clean sitemaps and site structure
- Contact us: ask for a free 30-minute review
๐ Dominate Local Search & Grow Your Business
SEO Agency Dublin helps local businesses rank higher, attract leads, and outrank competitors.
Don't let competitors steal your customers. Let's turn your website into a lead magnet.
Claim your free SEO audit โ

