
A sitemap is a file that lists the pages of your website in one place, so search engines can find them all without guessing. Think of it as a map you hand to Google and Bing: here are my pages, here is when each one was last updated, and here is how they fit together. Without one, search engines still find most pages by following links — but pages that are new, buried deep, or linked from nowhere are easy to miss.
Adding a sitemap is a small job with an outsized payoff. It takes well under an hour on most websites, it costs nothing, and it stays useful for as long as the site exists. This guide explains what a sitemap is, which kind you need, how to create one on any platform, and how to submit it to Google and Bing so your pages get found.
What a Sitemap Actually Is
A sitemap is a file, usually named sitemap.xml, that lives on your website and lists its important pages. Each entry gives the page's address and, optionally, the date it was last changed. Search engines read this file when they crawl your site, and they use it as a starting list of pages worth visiting.
It is a list, not a ranking tool. A sitemap does not make a page rank higher, and it does not guarantee that a page will appear in search results. What it does is make discovery reliable: a page listed in your sitemap is a page a search engine knows exists. That matters most for new pages, which have no links pointing to them yet, and for large sites, where a crawler following links alone may never reach every corner.
It is for search engines first, people second. The XML sitemap your site serves at /sitemap.xml is written for crawlers — it is a plain list of addresses, not a page anyone would enjoy reading. There is a second kind, the HTML sitemap, which is a human-readable page of links for visitors. The two solve different problems, and this guide covers both, but when people say 'add a sitemap', they almost always mean the XML one.
Most content management systems create an XML sitemap automatically. WordPress sites with an SEO plugin, Wix, Squarespace and Shopify all generate one for you. If your site is custom-built or static, you create the file yourself or with a generator — the steps below cover all three routes.
XML Sitemap vs HTML Sitemap — Know the Difference
The two kinds of sitemap are easy to confuse because they share a name and a purpose — helping something find your pages — but they serve different audiences and live in different places.
XML sitemap. A machine-readable file at an address like yoursite.com/sitemap.xml. It lists page URLs with optional details such as the last-modified date. Visitors never see it; search engine crawlers read it. This is the sitemap that helps your pages get discovered and indexed, and it is the one this guide focuses on.
HTML sitemap. An ordinary web page, usually linked in the footer, that lists links to the main sections and pages of your site in a readable layout. It helps human visitors who are lost or looking for a page they cannot find through the navigation. It also gives search engines one more page of internal links to follow, which is a small bonus.
You do not have to choose between them. A site can — and often should — have both. But if you only do one thing after reading this guide, make it the XML sitemap: that is the one search engines actually ask for, and it is the one you submit in Search Console.
Do You Actually Need a Sitemap?
Strictly speaking, no website is required to have a sitemap. Search engines are good at finding pages by following links, and a tiny site with a handful of well-linked pages will be found without one. But 'not required' and 'not worth having' are different things, and for most sites the answer is yes — add one.
You need one most if your site is new. A new site has no backlinks and little crawl history, so search engines have few paths in. A sitemap gives them a complete list on day one instead of making them discover pages one link at a time.
You need one if your site is large. Once a site grows past a few hundred pages, some pages end up several clicks from the homepage, or reachable only through search filters and pagination. Crawlers have a budget for how much of a site they will crawl in one visit; a sitemap tells them which pages are worth spending it on.
You need one if your pages change often. News sites, blogs that publish daily, and shops with rotating stock all benefit from the last-modified date in a sitemap: it signals to search engines which pages have fresh content worth re-crawling, instead of leaving them to guess.
The only sites that can reasonably skip one are very small, fully interlinked sites — say, five pages where every page links to every other. Even then, a sitemap costs nothing and takes minutes to set up, so there is little reason not to have one.
Step 1: Decide Which Pages Belong in It
Before you generate anything, decide what goes in. A sitemap should list the pages you want search engines to find and show — not every URL your site can produce. Including the wrong pages is worse than including too few, because it teaches crawlers to spend time on pages that do not matter.
Include: your homepage, service and product pages, blog posts and guides, category and landing pages, and any page a visitor might reasonably search for. If a page has useful content and you would be happy for it to appear in search results, it belongs in the sitemap.
Leave out: admin and login pages, thank-you and confirmation pages, duplicate versions of the same content (such as print views or URL parameters that show the same page), pages you have deliberately blocked from search engines, and pages that return errors or redirect elsewhere. A sitemap entry should point at a live page that returns a 200 status and is the canonical version of that content — never a redirect, never a 404.
If your site is small, you can make this list by hand in a few minutes: open your navigation, your blog index, and your service pages, and write down the URLs. On a larger site, your CMS or a crawler tool can produce the list for you — but still review it. Automated lists often include tag pages, author archives and filter URLs that add noise rather than value.
Step 2: Create the XML Sitemap File
There are three practical ways to create a sitemap, and the right one depends on how your website is built. All three produce the same kind of file, so pick the route that matches your platform.
Route 1: Let your platform generate it. This is the easiest route and the one most sites should take. On WordPress, an SEO plugin such as Yoast SEO or Rank Math generates a sitemap automatically and updates it whenever you publish or edit a page — you only need to check that the plugin is active and find the sitemap address, usually yoursite.com/sitemap_index.xml or yoursite.com/sitemap.xml. Wix, Squarespace and Shopify also generate sitemaps automatically; on Shopify the sitemap lives at yoursite.com/sitemap.xml and updates itself. If your platform already does this, your job is mostly verification, covered in step 3.
Route 2: Use an online sitemap generator. For static or custom-built sites without a CMS, a free online generator can crawl your site and build the file. You enter your homepage address, set how deep it should crawl and how many pages to include, and download the resulting sitemap.xml. This works well for sites up to a few hundred pages. Check the output before uploading it: generators sometimes include URLs you would rather leave out, such as image attachment pages or parameter URLs, and you can delete those lines before the file goes live.
Route 3: Write the file by hand. For a small site, a hand-written sitemap is a plain text file with a simple structure, and it gives you full control over exactly what is listed. Each page is one entry with its address and the date it was last changed. A minimal example for a three-page site looks like this: a urlset wrapper, and inside it one url block per page, each with a loc element holding the full address and a lastmod element holding the date. Save it as sitemap.xml and upload it to the root of your site, so it is reachable at yoursite.com/sitemap.xml. Hand-writing is practical up to a few dozen pages; beyond that, use a generator or a build script so the file stays accurate as the site grows.
Whichever route you take, the result is the same: one XML file, sitting at the root of your site, listing the pages you want found.
What Each Entry in a Sitemap Means
A sitemap entry has one required piece of information and three optional ones. Understanding what each does — and what search engines actually do with it — keeps you from wasting effort on details that do not matter.
loc — the page address (required). The full URL of the page, including https:// and your domain. This is the only field a sitemap entry must have. Every URL listed should be the canonical version of the page, and it must return a successful response when a crawler visits it.
lastmod — the last-modified date (optional, but the most useful). The date the page last changed, in year-month-day format. Search engines use this to decide which pages are worth re-crawling. Keep it honest: only update the date when the page content actually changes. A sitemap where every page claims to have changed today teaches crawlers to ignore the field entirely.
changefreq — how often the page changes (optional). A hint such as daily, weekly or monthly. In practice, search engines treat this as a very weak signal and mostly rely on lastmod and their own crawl history instead. You can include it or leave it out; it will not make or break your sitemap.
priority — how important the page is (optional). A number from 0.0 to 1.0, relative to the other pages on your own site. Search engines have said openly that they largely ignore this field. Do not spend time fine-tuning priorities — a homepage at 1.0 and everything else at 0.8 is fine, and leaving the field out entirely is also fine.
The practical takeaway: get loc right on every entry, keep lastmod truthful, and treat changefreq and priority as optional extras rather than essentials.
Large Sites: Sitemap Index Files
One sitemap file has limits: it can hold at most 50,000 URLs and must stay under 50 MB uncompressed. Most small business sites will never come close — a hundred pages is a rounding error against that limit. But blogs, shops and directories with thousands of pages need a different arrangement.
Split by section. The standard answer is a sitemap index file: a small file that points to several smaller sitemaps, one per section of the site. A common split is one sitemap for pages, one for blog posts, and one for products — for example, sitemap-pages.xml, sitemap-posts.xml and sitemap-products.xml, all listed inside sitemap_index.xml at the root. Search engines read the index first, then fetch each sitemap it points to.
Platforms handle this for you. If you use WordPress with an SEO plugin, the index file is generated automatically and you will see the split when you open your sitemap address. Shopify and Wix do the same behind the scenes. You only need to build an index by hand if you are generating sitemaps yourself for a large custom site — and at that scale, a small build script that regenerates the sitemaps whenever content changes is worth more than any manual process.
When you submit a sitemap to Google, submit the index file rather than the individual pieces: one submission covers everything it points to.
Step 3: Put the Sitemap Where Search Engines Can Find It
A sitemap only works if crawlers can reach it. The convention is to place it at the root of your site — yoursite.com/sitemap.xml — because that is the first place search engines look. Most platforms and plugins do this by default; if you generated the file yourself, upload it to the root folder of your hosting, next to your homepage file, not inside a subfolder.
Check it in your browser. Open yoursite.com/sitemap.xml in a browser. You should see a list of your page addresses — browsers usually render it as a readable list. If you see a 404 error, the file is in the wrong place or under the wrong name. If you see an XML error, the file has a formatting problem: a common cause is an unescaped & character in a URL, which must be written as & in XML, or a missing closing tag.
Point to it from robots.txt. Your robots.txt file can include a line that tells crawlers where the sitemap lives, for example: Sitemap: https://yoursite.com/sitemap.xml. This is a small, optional step — search engines will find a root-level sitemap without it — but it costs one line and removes any doubt, and it also helps other crawlers that do not use Search Console.
Make sure it is not blocked. Check that your robots.txt does not disallow the sitemap itself, and that the file returns a 200 status rather than a redirect. A sitemap behind a redirect usually still works, but a direct, clean address is more reliable and easier to debug when something goes wrong.
Step 4: Submit It to Google Search Console
Placing the file on your site is enough for Google to find it eventually, but submitting it in Search Console speeds things up and — more importantly — gives you a report on whether Google can actually read it. If you have not set up Search Console yet, do that first: verify ownership of your site, then come back to this step.
1. Open the Sitemaps report. In Search Console, select your property, then open Sitemaps from the left-hand menu under Indexing. You will see a field for adding a new sitemap and a list of any sitemaps already submitted.
2. Enter the sitemap address. Type the path after your domain — usually just sitemap.xml — and click Submit. If you use a sitemap index, enter the index address instead, such as sitemap_index.xml. Google fetches the file within minutes and reports back.
3. Read the status. A status of Success means Google read the file. It also shows how many URLs were discovered — compare that number with how many pages you expected. If the count is far lower, some entries may have been dropped, and the report will usually say why. A status of 'Could not fetch' or an error means the file was unreachable or malformed; fix the file and resubmit.
Submission is a one-time act per sitemap, not a recurring chore. Google re-checks a submitted sitemap on its own schedule. You only need to come back if the status changes to an error, or if you change the sitemap's address.
Step 5: Submit It to Bing Webmaster Tools
Google is not the only search engine that reads sitemaps. Bing powers its own search results and also supplies results to other engines, so submitting your sitemap there covers a meaningful share of searches your Google submission does not reach.
The process mirrors Google's. In Bing Webmaster Tools, verify your site, open the Sitemaps section, and submit the same sitemap address. Bing fetches the file and reports how many URLs it found, just as Search Console does. If you already verified your site in Search Console, Bing lets you import your verified sites from Google, which skips a second verification step.
IndexNow is a separate, complementary step. Bing also supports IndexNow, a protocol that lets your site ping search engines the moment a page is published or changed, rather than waiting for the next sitemap crawl. It is not a replacement for a sitemap — the sitemap is still the complete list — but the two work well together: the sitemap shows everything, and IndexNow flags what just changed. If your platform supports IndexNow, enable it; if it does not, the sitemap alone is still a solid setup.
Once both submissions are done, your sitemap is working for the two search engines that matter most to the majority of small business sites.
7 Sitemap Mistakes That Waste the Whole Exercise
A sitemap is simple, which makes its mistakes easy to overlook. These seven are the ones that show up most often, and each one quietly reduces the value of the file.
1. Listing pages that do not exist. Every URL in a sitemap should return a live page. Entries that 404, redirect, or point at a server error teach crawlers that your sitemap is unreliable, and they start trusting it less.
2. Including pages you blocked from indexing. If a page carries a noindex tag or is blocked in robots.txt, do not list it in the sitemap. The two signals contradict each other, and the conflict wastes crawl budget on a page you have already decided should not appear in search results.
3. Using the wrong URL version. Pick one canonical form — https, with or without www, with a trailing slash or without — and use it everywhere. If your site lives at https://www.yoursite.com, your sitemap entries should say exactly that, not the http version or the bare domain.
4. Faking lastmod dates. Setting every page's last-modified date to today, or updating it on a schedule regardless of whether the page changed, destroys the one field search engines actually use to prioritise re-crawls. Update lastmod only when the content changes.
5. Listing duplicate and thin pages. Tag archives, author pages with one post, search-result pages and near-duplicate URLs dilute the sitemap. Every entry should be a page worth a visit; if you would not link to it from your navigation, question whether it belongs in the sitemap.
6. Forgetting to update it after a redesign. A site migration or redesign often changes URLs. If the sitemap still lists the old addresses, it points crawlers at redirects and dead ends. Regenerate the sitemap as part of any launch checklist, and resubmit it in Search Console afterwards.
7. Submitting it once and never checking it again. Sitemaps break quietly: a plugin update changes the address, a server move blocks the file, a malformed entry creeps in. Check the Search Console sitemaps report every few months. A status that flipped from Success to an error is a problem you want to catch in weeks, not years.
Keeping Your Sitemap Up to Date
A sitemap is only as good as its last update. A file that lists last year's pages while this year's posts are missing is worse than no file at all in one respect: it gives search engines a confident, wrong picture of your site.
Automatic is best. If your platform generates the sitemap, it updates itself when you publish, edit or delete a page — that is the main reason to prefer the platform route. Check occasionally that the generation is still working, especially after plugin or theme updates, but day to day there is nothing to do.
If you generate it manually, make it a habit. Tie sitemap regeneration to publishing: every time a page is added or removed, regenerate the file and upload the new version. For a small site this is a two-minute job. For a growing site, that recurring manual step is a sign to switch to an automated method — a build script that regenerates the sitemap on every deploy, or a move to a platform that does it for you.
You do not need to resubmit after every change. Once a sitemap is submitted in Search Console and Bing Webmaster Tools, both engines re-fetch it on their own. Resubmission is only needed if the sitemap's address changes, or if the report shows an error. Your job after setup is maintenance and the occasional status check — not repeated submissions.
Treat the sitemap as part of the site's infrastructure, like hosting or backups: set it up properly once, automate its updates, and check on it from time to time. That is the whole job.
Conclusion
Adding a sitemap is one of the smallest jobs in website ownership, and one of the most durable. A single XML file, listing the pages you want found, sitting at yoursite.com/sitemap.xml, submitted once to Google and Bing — that is the whole setup. It will not rank your pages for you, and it will not fix thin content or a slow site. What it will do is make sure search engines know your pages exist, including the new and deeply buried ones they would otherwise take weeks to find, or never find at all.
If your platform generates a sitemap already, your work today is verification: open the file, check the entries, submit it, and read the status report. If it does not, generate the file, upload it to your site root, and submit it the same way. Either way, put a reminder in your calendar to check the sitemap status in Search Console in a few months — a quiet error there is the only thing that can undo the work.
Frequently Asked Questions
Do I need a sitemap if my website is small?
Not strictly — search engines can find a small, well-linked site by following links. But a sitemap costs nothing, takes minutes to set up, and guarantees that new or buried pages are discovered. For a new site especially, it is worth having from day one.
Will a sitemap guarantee my pages appear on Google?
No. A sitemap tells Google that a page exists and when it changed; Google still decides whether to index it, based on the page's content, quality and usefulness. Think of a sitemap as an invitation, not a guarantee — but without the invitation, some pages may never be considered at all.
Where should a sitemap live on my website?
At the root of your site, at yoursite.com/sitemap.xml. That is the first place search engines look. You can also point to it from your robots.txt file with a line like Sitemap: https://yoursite.com/sitemap.xml, which removes any doubt about where it is.
How often should I update my sitemap?
Whenever a page is added, removed or substantially changed. If your platform generates the sitemap automatically, this happens on its own. If you generate it by hand, regenerate and re-upload it as part of publishing. You do not need to resubmit it in Search Console after routine updates — Google re-fetches a submitted sitemap by itself.
Can I have more than one sitemap?
Yes. Large sites use a sitemap index file that points to several sitemaps, usually one per section — pages, blog posts, products. A single sitemap file can hold at most 50,000 URLs and must stay under 50 MB uncompressed, so the index arrangement is the standard answer once a site outgrows one file.
What is the difference between a sitemap and robots.txt?
A sitemap lists the pages you want search engines to find; robots.txt tells crawlers which parts of your site they may and may not visit. They work together: robots.txt can even include a line pointing to your sitemap. Neither one controls ranking — both are instructions that help crawlers do their job.
