Core Web Vitals: How Site Speed Affects Google Rankings
Core Web Vitals explained: the LCP, INP and CLS thresholds, how much they affect rankings, how to measure them correctly and what to fix first.
Key takeaways
An XML sitemap is a file that lists the pages you want search engines to discover and index, along with the date each one last changed. You generate it from your platform or with a script, place it at the root of your domain, submit it in Google Search Console and reference it in robots.txt. It does not guarantee indexing, but it shortens the path to new pages.
Most problems do not come from creating the file. They come from what goes into it. A sitemap full of redirects, blocked pages and duplicates tells Google that the site is not in order, and your Search Console report becomes impossible to read. This guide shows what a correct file looks like, what to include, how to build it on common platforms and how to check that it works. It is one piece of the foundation we build through technical SEO, together with robots.txt, canonical tags and redirects.
An XML sitemap is a text file in XML format that lists the canonical URLs of a website and, optionally, some details about them. Crawlers read it; visitors do not. It is not the same as an HTML “site map” page built for people, although both can exist side by side.
Its job is discovery. Google finds pages mostly by following links, and a sitemap adds a second path: an explicit list. It is most useful when:
What a sitemap does not do: it does not force indexing, improve rankings or repair weak pages. Google’s documentation is clear that a submitted URL is not necessarily crawled or indexed. If a page is thin, duplicated or adds nothing new, it stays out of the index no matter how many sitemaps list it. For the order in which things matter on a fresh site, see our 90-day SEO plan for a new website.
The minimal structure is simple. Every page gets a <url> element, and the only required tag inside it is <loc>:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2026-03-18</lastmod>
</url>
<url>
<loc>https://www.example.com/blog/sitemap-guide/</loc>
<lastmod>2026-03-10</lastmod>
</url>
</urlset>The basic rules, from the sitemaps.org protocol and Google’s documentation:
https://), host and path, never relative paths.&, ', ", <, >) are written as entities (& and so on), and non-ASCII characters are encoded properly.Only some of the optional tags matter:
| Tag | What the protocol says | How Google treats it |
|---|---|---|
<loc> | Full page address (required) | Used; must be the canonical URL |
<lastmod> | Date of last modification | Used only if consistently accurate |
<changefreq> | How often the page changes | Ignored |
<priority> | Relative importance, 0.0 to 1.0 | Ignored |
In practice you can delete changefreq and priority from your generator at no cost. If your plugin stamps every page with “weekly” and “0.8”, it does no harm, but it does no good either.
lastmod should reflect the last significant change: main content, structured data or links. It should not move when the copyright year in the footer changes, when a comment is added or every time the file is regenerated. If every URL gets today’s date every day, Google is likely to treat the field as unreliable and ignore it. An accurate date, on the other hand, can help Google decide what to recrawl, especially after you refresh old articles.
The golden rule: the sitemap lists URLs you want to see in search results. Each one should return 200, be indexable and carry a canonical tag pointing to itself.
| URL type | In the sitemap? | Reason |
|---|---|---|
| Main pages, services, articles, categories | Yes | They are search destinations |
| Active products, in stock or available to order | Yes | Pages with commercial value |
| URLs that redirect (301/302) | No | List the destination instead |
| Pages returning 404 or 410 | No | Signals a neglected file |
Pages with noindex | No | You would send contradictory signals |
Parameter variants (?sort=, ?utm_) | No | They duplicate the canonical page |
| Pages canonicalized to another URL | No | Include only the canonical address |
| Internal search, cart, account, thank-you pages | No | No search value |
| Pages blocked in robots.txt | No | Google cannot crawl them |
On an online store the difference shows up fast. Combined filters can create thousands of near-identical URLs. A filtered URL belongs in the file only if it answers a real search and has content of its own. More on that in our guide to canonical tags and duplicate content.
You rarely write the file by hand. The right method depends on what you run.
/wp-sitemap.xml. SEO plugins (Yoast, Rank Math, All in One SEO) replace it with their own file, usually /sitemap_index.xml. Use only one, so you do not end up with two different sitemaps for the same site. Core settings are covered in our WordPress SEO checklist.Whatever the method, open the file in a browser and check three things: it loads with a 200 status, the XML structure is valid and it contains exactly the URLs you expected.
Above 50,000 URLs, or when you want a logical split, you create a sitemap index that lists other sitemaps:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.example.com/sitemap-pages.xml</loc>
<lastmod>2026-03-18</lastmod>
</sitemap>
<sitemap>
<loc>https://www.example.com/sitemap-products.xml</loc>
<lastmod>2026-03-17</lastmod>
</sitemap>
</sitemapindex>According to the protocol, an index can list up to 50,000 sitemaps. Splitting by page type also helps diagnosis: if products show a low indexing rate, you see it immediately, without filtering by hand.
There are two complementary methods, and it is best to use both.
sitemap.xml or sitemap_index.xml) and click Submit.robots.txt:Sitemap: https://www.example.com/sitemap.xmlThe Sitemap: line in robots.txt is also read by other search engines, such as Bing, and does not depend on a Search Console account. If you are unsure how your file should look, our robots.txt generator builds a correct version with the sitemap line included. For more on the console itself, read the Google Search Console beginner’s guide.
One historical note: the old “ping” mechanism, a request sent to a dedicated Google address, was deprecated in June 2023 and has since stopped working, so you no longer need it. Search Console and robots.txt are the supported methods.
Beyond the standard file, there are extensions for specific cases.
xhtml:link elements, instead of in each page’s head. This pays off when you have many languages and do not want to bloat every HTML file. The full procedure is in our hreflang guide, and the hreflang generator outputs the code.Not every site needs these. If you run a blog and a services page, the standard sitemap is enough.
After submitting, look at the Sitemaps report and the page indexing report in Search Console. Check:
If the gap between submitted and indexed pages is large, that does not automatically mean the sitemap is wrong. The cause is often page quality, duplicates or site architecture; our guide to pages not indexed goes through them one by one.
Be realistic about what an XML file can do:
A good sitemap is short, clean and updated automatically. Work through these steps in order:
changefreq and priority; keep lastmod only if you can make it accurate.Sitemap: line to robots.txt.If you want someone to check your sitemap, canonicals and indexing together, see how we work in our technical SEO service or write to us through the contact page.
Frequently asked questions
Not strictly. Google can find a small site when its pages link to each other. A sitemap costs almost nothing, though, and it gives you a reporting view in Search Console. Add one if the site is new, has few external links or has pages that are hard to reach from the menu.
There is no guaranteed timeline. The file may be read within hours or days, and the URLs inside are crawled at Google’s own pace. If the report still says “Couldn’t fetch” after a week, check the address, robots.txt access and the HTTP status code of the file.
Yes, and large sites usually do: one file for pages, one for articles, one for products. Group them in a sitemap index and submit only the index. Splitting by content type also shows you in Search Console where indexing problems cluster.
The file must be UTF-8 and any non-ASCII characters in a URL must be encoded correctly. The safest approach is to avoid diacritics in slugs altogether, pick the address once at publication and not change it later. That also keeps links cleaner when people share them.
It means Google knows the pages exist but has not crawled or indexed them yet. Check their quality and uniqueness, the internal links pointing to them and your server speed. A sitemap alone will not fix this; our guide to pages not indexed walks through the likely causes.
Related service
Keep reading
Core Web Vitals explained: the LCP, INP and CLS thresholds, how much they affect rankings, how to measure them correctly and what to fix first.
Hreflang explained: URL structures, the three ways to implement it, language codes, x-default, common mistakes and how to check a multilingual site.
JavaScript SEO explained: how Google renders pages, which rendering model to choose (SSR, SSG, CSR), common errors and how to test indexing step by step.
Send us your website address and we’ll reply with a free initial analysis and a concrete SEO strategy — no strings attached.