Skip to content
ArkaRank

How to Create a Sitemap (and Check It's Working)

Learn how to create a sitemap the easy way: check if you already have one, build it if not, submit it to Google and confirm it's working.

By the ArkaRank teamLast updated 8 min read

How to create a sitemap, in short: check whether your site already has one at yoursite.com/sitemap.xml, and if it doesn't, generate an XML file listing the canonical URLs you want found. Publish that file on your own domain and submit it in Google Search Console's Sitemaps report.

Then confirm it works. The file should load, list the right pages and show no errors in Search Console. This guide walks through each step, including what belongs in the file and what doesn't.

One expectation to set early: a sitemap helps Google discover your pages, but it's a hint, not an instruction. It doesn't guarantee indexing, and no one can guarantee rankings.

What a sitemap is (and what it isn't)

An XML sitemap is a file that lists the pages on your site you want search engines to know about. It follows a shared format described at sitemaps.org, which Google, Bing and other search engines read.

Its job is discovery. Google finds most pages by following links, so a sitemap matters most when links alone might not be enough:

  • Your site is new and few other sites link to it yet.
  • Your site is large, or has pages buried several clicks deep.
  • Your internal linking is thin, so some pages have few links pointing at them.
  • You add or change pages often, such as new blog posts or location pages.

What a sitemap isn't: a ranking factor. Google's documentation describes a sitemap as a hint and says submitting one doesn't guarantee the listed pages will be crawled or indexed.

You may also come across an HTML sitemap, which is a normal web page listing links for visitors. That's a different thing. This guide is about the XML file for search engines.

Step 1: Check whether you already have one

Many website builders and content management systems create a sitemap automatically, so check before you build anything.

  1. Try the common addresses

    Open yoursite.com/sitemap.xml and yoursite.com/sitemap_index.xml in a browser. A list of web addresses, or a list of links to other sitemaps, means you already have one.

  2. Look in robots.txt

    Open yoursite.com/robots.txt and look for a line starting with Sitemap:. The robots txt checker fetches the file and shows what it contains.

  3. Search your platform's help pages

    Look up "sitemap" in your builder or CMS documentation to see whether it generates one and where the file lives.

  4. Look in Search Console

    If someone has already set up Google Search Console for your site, the Sitemaps report shows any sitemap submitted before.

If you find a sitemap, skip to Step 4 below and run it through the sitemap checker to confirm it's in good shape.

Step 2: Create a sitemap (three routes)

If you don't have one, pick the route that matches how your site is built.

Route A: your platform or CMS

If your site runs on a builder or CMS, look for a built-in sitemap setting and switch it on. This is the easiest route to keep current, because the platform updates the file when you add, remove or rename pages.

Route B: a plugin or generator tool

Plugins add sitemap generation to a CMS that doesn't have it built in. Online generators crawl your site and hand you a file to upload. Both can work, but a one-off generated file goes stale as soon as you add a page. If you use a generator, add "regenerate and re-upload the sitemap" to your routine for every new, moved or deleted page.

Route C: write it by hand

For a very small site with a handful of pages, a hand-written file is fine. A minimal valid sitemap has this structure, from top to bottom:

  1. XML declaration

    The first line declares XML version 1.0 with UTF-8 encoding.

  2. The urlset element

    This wraps everything and declares the sitemaps.org namespace, http://www.sitemaps.org/schemas/sitemap/0.9.

  3. One url element per page

    Each contains a loc element holding the full address, such as https://www.example.com/services/.

  4. Optional lastmod

    Inside a url entry, the date the page's content last changed, written like 2024-05-01.

Save the file as sitemap.xml and upload it to your site's root folder, so it loads at an address like https://www.example.com/sitemap.xml.

Format rules worth knowing

  • Save the file with UTF-8 encoding.
  • Use full, absolute URLs, including https:// and the exact domain version (with or without www) your site actually uses.
  • Keep each file under 50,000 URLs and 50MB uncompressed. If you need more, split into several sitemaps and list them in a sitemap index file.
  • Google ignores the priority and changefreq values, so you don't need to fill them in.
  • Google may use lastmod if it's consistently accurate. Only set it when it reflects a real content change, not every time the file is rebuilt.

What to include and leave out

A sitemap should be a clean list of the pages you actually want in search results: your home page, service pages, location pages, key blog posts and your contact page. Anything else adds noise. Use this checklist before you submit:

  • Every URL returns a 200 status, not a redirect or an error
  • Every URL is the canonical version of its page
  • Your key pages are listed: home, services, locations, main blog posts and contact
  • No pages marked noindex
  • No redirected URLs or 404 pages
  • No duplicate or parameter versions, such as addresses with sorting or tracking codes on the end
  • No thank-you, admin, login or cart pages
  • Nothing listed that robots.txt blocks

That last point catches people out. If your sitemap says "please find this page" while robots.txt says "don't crawl it", you're sending mixed signals. Decide which pages should be found and make both files agree.

After a redesign or a move to a new domain, update the sitemap so it lists only the new addresses. Then use the redirect checker to confirm the old addresses redirect cleanly to their new versions.

Step 3: Tell Google about it

Once the file is live, let Google know where it is. There are two documented ways, and it's worth doing both.

  1. Verify your site in Search Console

    Submitting a sitemap requires a verified Search Console property for your domain. If you haven't set one up, our guide on how to get your business on Google covers the basics.

  2. Submit it in the Sitemaps report

    Open the Sitemaps report, enter your sitemap's address and submit it. If you use a sitemap index file, submit the index rather than each file.

  3. Add it to robots.txt

    Add a line such as Sitemap: https://www.example.com/sitemap.xml to your robots.txt file. Crawlers that read robots.txt, including Bing's, can then find it.

You don't need to resubmit every time you change a page. Google re-fetches sitemaps it already knows about.

Step 4: Check it's working

Submitting isn't the finish line. These checks confirm the file is doing its job.

  1. Open it in a browser

    It should load over HTTPS on your own domain, without an error page, a login screen or a redirect to somewhere else.

  2. Run it through a checker

    Paste the address into the sitemap checker to confirm it's valid XML, see which URLs it lists and spot entries that redirect or return errors.

  3. Read the Sitemaps report

    In Search Console, the status should show success. Compare the discovered URL count with the number of pages you expect.

  4. Check the Page indexing report

    This shows which pages are indexed and, for those that aren't, the reason Google gives. You can narrow it to the pages from your submitted sitemaps.

If pages show as "Discovered - currently not indexed" or "Crawled - currently not indexed", that's usually not a sitemap fault. Google knows the pages exist and has chosen not to index them yet. Stronger content and better internal links are the usual places to look, and our SEO checklist covers both.

If you'd rather not run these checks by hand, ArkaRank is software whose SEO audits crawl a site politely, respecting robots.txt, and list any checks that didn't run instead of marking them passed. On websites it publishes, it verifies the site with Google itself and syncs indexing data from Search Console daily, with the sync date shown.

Next step

The whole job comes down to four moves: find your sitemap, create one if it's missing, submit it to Google, then check it's healthy. Revisit the checklist above after any redesign, domain move or big batch of new pages.

The quickest way to start is to run your current sitemap, or the one you've just made, through the free sitemap checker and fix anything it flags.

Frequently asked questions

Does every small business website need a sitemap?

Not strictly. Google's documentation says small sites with good internal linking may be found without one. But a sitemap is easy to set up, rarely causes harm when it's accurate, and helps when your site is new or you add pages often, so most owners are better off having one.

Will submitting a sitemap get my pages indexed or ranked faster?

Not reliably. Google treats a sitemap as a hint that helps it discover pages, not a request it must follow. It doesn't guarantee crawling, indexing or rankings, and no one can promise how quickly Google will act on it.

How often should I update my sitemap?

Whenever you add, remove or move pages. If your platform generates the sitemap automatically, this happens for you. If you uploaded a generated or hand-written file, update and re-upload it after each change. You don't need to resubmit it in Search Console each time.

Should I include images, blog tags or category pages in my sitemap?

Include tag and category pages only if they're useful pages you want in search results and they aren't marked noindex; thin archive pages are usually best left out. Google supports an image extension for sitemaps, but for most small sites, images on pages that are already listed don't need a separate entry.

Why does Search Console say "Couldn't fetch" for my sitemap?

Start with the basics: check the address you submitted is exactly right, that the file loads publicly over HTTPS without a login, that robots.txt doesn't block it, and that it sits on the same domain as your verified property. Run it through a sitemap checker to rule out XML errors, then check the report again later.

Do I need a separate sitemap for Bing or AI search tools?

For Bing, no. The same sitemaps.org file works, and Bing can find it through the Sitemap line in robots.txt or a submission in Bing Webmaster Tools. There's no separate, documented sitemap format for AI assistants, so there's no need to create one.

Check your sitemap now

Paste your sitemap address into the free sitemap checker to confirm it's valid and see every URL it lists. If you later want ongoing checks, ArkaRank is software that builds and hosts websites, runs SEO audits and syncs Search Console data on the sites it publishes, with changes waiting for your approval. Every plan starts with a 7-day free trial.