Skip to main content

What is an XML sitemap, and does your site need one?

The Tasadr team · ·3 min read

An XML sitemap is a file that lists the pages you want search engines to find, so a robot knows where to start and when each page changed. It is not required for indexing, since Google calls it a hint, but it helps a large or new site with few internal links.

Also known as XML sitemap · sitemap · sitemap.xml · site map · خريطة الموقع · خارطة الموقع

On this page (7)
  1. What is an XML sitemap?

    It is a text file in XML format that you place on your site and that lists the addresses of the pages you want search engines to index. A crawler reads it like a table of contents, so it learns what you have without following every link.

    You may also hear sitemap or sitemap.xml. Google accepts three formats: XML, RSS or Atom feeds, and a plain text file with one address per line, and it has no preference between them. One file may hold at most 50 MB uncompressed or 50,000 URLs. A bigger site splits its sitemap.

  2. Is an XML sitemap required for Google to index my site?

    No. Google says submitting a sitemap is merely a hint, and it may not download it or use it for crawling. Pages that robots reach through links are indexed without one.

    It helps when your site is large, or new with few outside links, or has pages that are many clicks away from the home page. It can also carry a last-modified date, which Google uses only if it is consistently accurate. Google ignores the priority and changefreq values.

    What Google reads in a sitemap
    ElementDoes Google rely on it?Note
    Page address, locYesThe base of the sitemap
    Last modified, lastmodIf consistently accurateIt reflects the last significant change, not a copyright year
    PriorityNoGoogle ignores it
    Change frequency, changefreqNoGoogle ignores it
  3. An Arab-market example: a furniture store in Dubai

    An illustrative example. A fictional store at dubai-furniture.example added 400 new product pages this month, and they have few internal links because they are not yet in the store's menus.

    The store builds an XML sitemap that lists the product pages with the date each was added and submits it from Google Search Console. The robot finds the new pages sooner, and a page whose price changed twice this month keeps an honest date. The store never lists a blocked or redirected page in it.

  4. How do you write a sitemap and submit it?

    List only the pages you want in search results, and keep every address in it working directly, with no redirect.

    • Generate it from your site's system so it updates with every new page.
    • Leave out pages blocked by robots.txt or by noindex.
    • Write lastmod only when a significant change happens.
    • Submit it from the sitemaps report in Google Search Console.
    • Name its location in robots.txt so every robot can find it.

Sources

  1. Build and submit a sitemap · Google Search Central ·

Frequently asked questions

Where do I put the sitemap file?

The usual place is the site root, such as mysite.example/sitemap.xml. You can use another path as long as you name it in robots.txt or submit it in Google Search Console.

Do AI crawlers read the sitemap?

Not every engine says so. The safe course is a correct sitemap and pages open to robots, as in the crawler guide.

How many pages fit in one sitemap?

Up to 50,000 URLs or 50 MB uncompressed. A bigger site splits it into several files and gathers them in an index file.