What Is sitemap.xml? How to Create a Sitemap and Submit It to Search Console
Updated: October 13, 2026 · AracMerkezi
sitemap.xml is an XML file that tells search engines the list of important pages on your site. It does not guarantee indexing, but it makes it easier for bots to discover new and deeply nested pages. It is especially useful for new sites and sites with few internal links.
Basic structure
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://yourdomain.com/</loc>
<lastmod>2026-10-21</lastmod>
</url>
<url>
<loc>https://yourdomain.com/about/</loc>
</url>
</urlset>
<loc>: The full, single-form address of the page (required).<lastmod>: The date the page was actually updated (optional).<changefreq>and<priority>: Google does not use these fields; adding them is not required.
Step by step: your first sitemap
- Write the full addresses of all pages you want indexed into a list.
- Paste the list into the tool and get the XML output.
- Upload the file to the root directory under the name
sitemap.xml. - Open it in a browser and make sure the XML shows.
- Submit it in Search Console and add a
Sitemap:line to robots.txt.
Common situations
- “Sitemap could not be read”: Make sure the file is served as XML, the address returns 200, and the encoding is UTF-8.
- “Submitted URL has a redirect”: A common cause is using http or addresses without the trailing slash in the sitemap while your site redirects them. Write the addresses in their final form.
- “Submitted URL marked ‘noindex’”: If a page listed in the sitemap has
noindex, a conflict arises.
Sitemap index file example
Large sites use this structure: within <sitemapindex>, <sitemap><loc>…</loc></sitemap> entries, each pointing to a sub-sitemap. They are generally split by content type (posts, products, categories).
How often should it be updated?
When you add a page or update an important page. If you don't have an automatic system, a regular monthly check is enough for small sites.
Limits
A sitemap file can contain at most 50,000 URLs, and its uncompressed size must not exceed 50 MB. Larger sites create multiple files and gather them in a sitemap index file.
What to watch for
- Add only the pages you want indexed. Don't include addresses that are redirected, return 404, are
noindex, or whose canonical points to another page. - Write addresses in a single form: Your choices such as
https,wwwor non-www, and trailing slash must match the canonical tags. - Use absolute URLs; a relative path is invalid.
- Keep lastmod honest. A date that changes automatically every day leads Google to distrust this field.
- Use UTF-8 encoding and escape characters like
&as&. - Host the sitemap at the root of the same domain or below it.
How is it created?
- Content management systems (WordPress, etc.) mostly generate it automatically with a plugin.
- For small static sites, you can list the addresses and produce the file by hand or with a tool: the sitemap.xml Generator produces valid XML when you write one address per line. Enter only addresses within your site.
Submitting to Search Console
- Verify the site in Search Console (domain property or URL prefix).
- Go to the Sitemaps section in the left menu.
- Enter only the path of the file, for example
sitemap.xml; you can also write the full URL. - Press Submit and wait for the status to read “Success.”
Do not submit the robots.txt file; only an XML sitemap is accepted. You can also declare the sitemap in robots.txt with a Sitemap: line; for details, see the robots.txt guide.
After submitting
Statuses such as “Discovered – currently not indexed” or “Crawled – currently not indexed” are normal on new sites; page quality, internal links, and time determine this. For individual important pages, you can request indexing from the URL Inspection tool, but the result is not guaranteed.
Think about it together with meta tags
Every page in the sitemap should have a unique title and description. The Meta Tags and Open Graph guide and the Meta Tag and Open Graph Generator help with this.
Frequently asked questions
How many URLs can a sitemap have at most?
At most 50,000 URLs and 50 MB uncompressed; larger sites use multiple files and an index file.
Does a sitemap guarantee indexing?
No; it helps pages get discovered, and indexing depends on page quality and other signals.
What should be submitted to Search Console?
Only an XML sitemap such as sitemap.xml; the robots.txt file is not submitted.
Tools mentioned in this guide
More guides
- What Is robots.txt? How to Create It and Common Mistakes – What is robots.txt and how do you write it? Allow, Disallow, and Sitemap lines, an example file, common mistakes, and why it doesn't block indexing.
- What Are Meta Tags and Open Graph? Title, Description, Canonical, and Share Image – What are the title, meta description, canonical, robots meta, Open Graph, and Twitter Card tags? Recommended lengths, example code, and common mistakes.
- How to Do Keyword Research? SEO Basics – How to do keyword research? Finding search intent with free tools for a small site, competitor analysis and page mapping, with an example table.
- How to Calculate Percentages: Six Question Types, Formulas and Examples – Percentage math: percent of a number, what percent one is of another, increase and decrease, percentage points and reverse percentages, with examples.
- How to Calculate VAT: VAT-Inclusive and VAT-Exclusive Formulas and Examples – How do you separate VAT from a VAT-inclusive amount or add it to a VAT-exclusive one? Formulas, a mixed-rate invoice, rounding gaps and shortcuts.
This article is for general information only and is not legal, financial or medical advice. We are not an official institution.