What is an XML sitemap and why should you have one?

1 year ago 77
ARTICLE AD BOX

A bully XML sitemap acts arsenic a roadmap of your website that leads Google to each your important pages. XML sitemaps tin beryllium bully for SEO, allowing Google to find your indispensable pages quickly, adjacent if your internal linking isn’t perfect. This station explains what they are and however they assistance you fertile better.

What are XML sitemaps?

An XML sitemap is simply a record that lists a website’s indispensable pages, making definite Google tin find and crawl them all. It besides helps hunt engines recognize your website structure. You privation Google to crawl each important leafage of your website. But sometimes, pages extremity up without interior links pointing to them, making them hard to find. A sitemap tin assistance velocity up contented discovery.

Looking to grow your cognition of method SEO? We’ve conscionable launched a caller people successful the Yoast SEO academy focusing connected crawlability and indexability. One of the topics we tackle is however to decently usage XML sitemaps.

What does an XML sitemap look like?

An XML sitemap offers a standardized mode of listing posts and pages, making them discoverable for hunt engines. Here’s a precise elemental example, a sitemap with a azygous URL:

<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://www.yoast.com/wordpress-seo/</loc> <lastmod>2022-01-01</lastmod> </url> </urlset>

It consists of a mates of parts:

  • An XML mentation declaration: which hunt motor crawlers usage to find what benignant of record they are reading.
  • The URL set: tells hunt engines astir the protocol.
  • The URL: lists the URL of the page.
  • Lastmod: a day format describing erstwhile the leafage was past modified.

Every sitemap needs to travel this modular to beryllium valid. There are different properties similar <priority> and <changefreq> but these don’t person immoderate effect connected the workings oregon show of the sitemap.

An illustration of an XML sitemap

Let’s instrumentality a look astatine an example. Below, you’ll spot a screenshot of the basal XML sitemap of yoast.com. In this sitemap, you spot each the antithetic sitemaps connected yoast.com. You’ll announcement a day astatine the extremity of each line. This tells Google erstwhile each station was past updated and helps with SEO due to the fact that you privation Google to crawl your updated contented arsenic soon arsenic possible. When a day changes successful the sitemap, Google knows caller contented exists to crawl and index.

Yoast.com’s XML sitemap

As you tin see, the Yoast.com XML sitemap shows respective ‘index’ sitemaps: post-sitemap.xml, page-sitemap.xml, video-sitemap.xml etc. This categorization makes a site’s operation arsenic straightforward arsenic possible. So if you click connected 1 of the scale sitemaps, you’ll spot each URLs successful that peculiar sitemap. For example, if you click connected post-sitemap.xml you’ll spot each Yoast.com’s station URLs.

Yoast.com’s station XML sitemap

If you person a immense website, sometimes it’s indispensable to divided an scale sitemap. A azygous XML sitemap is constricted to 50,000 URLs and tin person a record size of up to 50MB, truthful if your website has much than 50,000 posts, you’ll request 2 abstracted ones for the station URLs, efficaciously adding a 2nd scale sitemap. The Yoast SEO plugin sets the bounds adjacent little — astatine 1.000 URLs — to support your sitemap loading arsenic accelerated arsenic possible.

What websites request an XML sitemap?

Google’s documentation says sitemaps are beneficial for “really ample websites,” “websites with ample archives,” “new websites with conscionable a fewer outer links to it,” and “websites which usage affluent media content.” According to Google, due interior linking should let it to find each your contented easily. Unfortunately, determination are galore sites retired determination that bash not springiness due thought to logically linking their content.

While we hold that these websites volition payment the astir from having one, astatine Yoast, we deliberation XML sitemaps are beneficial for each website. Every azygous website needs Google to beryllium capable to find indispensable pages easy and to cognize erstwhile they’re past updated. That’s wherefore this diagnostic is included successful the Yoast SEO plugin.

Which pages should beryllium successful your XML sitemap?

How bash you determine which pages to see successful your XML sitemap? Always commencement by reasoning of the relevance of a URL: erstwhile a visitant lands connected a peculiar URL, is it a bully result? Do you privation visitors to onshore connected that URL? If not, it astir apt shouldn’t beryllium successful it. However, if you don’t privation that URL to look successful the hunt results, you’ll request to add a ‘noindex’ tag. Leaving it retired of your sitemap doesn’t mean Google won’t scale the URL. If Google tin find it by pursuing links, Google tin scale the URL.

Example: A caller blog

Say, for example, you are starting a caller blog. Of course, you privation to guarantee that your people assemblage tin find your blog posts successful the hunt results. So, it’s a bully thought to instantly see your posts successful your XML sitemap. It’s harmless to presume that astir of your pages volition besides beryllium applicable results for your visitors. However, a thank you page that radical volition spot aft they’ve subscribed to your newsletter is not thing you privation to look successful the hunt results. In this case, you don’t privation to exclude all pages from your sitemap but conscionable this one.

Let’s enactment with the illustration of the caller blog. In summation to your blog posts, you make immoderate categories and tags arsenic well. These categories and tags volition person archive pages that database each posts successful that circumstantial class oregon tag. However, successful the opening determination mightiness not beryllium capable contented to capable these archive pages, making them ‘thin content’. For example, tag archives that amusement conscionable 1 post, are not that invaluable to visitors yet. You tin exclude them from the sitemap erstwhile you’re conscionable starting retired with your blog, and past see them erstwhile you person capable posts. You tin adjacent exclude each your tag pages oregon class pages astatine once, if you’re utilizing Yoast SEO.

However, this benignant of leafage could besides beryllium fantabulous ranking material. So, if you think: well, yes, this tag leafage is simply a spot ‘thin’ close now, but it could beryllium a large landing page, past enrich it with further accusation and images. And don’t exclude it from your sitemap successful this case.

How to marque Google find your sitemap

If you privation Google to find your XML sitemap quicker, you’ll request to add it to your Google Search Console account. You tin find your sitemaps successful the ‘Sitemaps’ section. If not, you tin adhd your sitemap astatine the apical of the page.

Adding your sitemap helps to cheque whether Google indexed each pages successful your sitemap. If determination is simply a large quality successful the ‘submitted’ and ‘indexed’ fig connected a peculiar sitemap, we urge looking into this further. Maybe there’s an error that prevents immoderate pages from indexing? Another enactment is that you whitethorn request much links pointing to the contented that’s not been indexed yet.

Google correctly processed each URLs successful a station sitemap

How to adhd XML sitemaps to your tract with Yoast SEO

Because of their SEO value, we’ve added the quality to make your XML sitemaps in our Yoast SEO plugin. They are disposable successful some the escaped and Premium versions of the plugin. We marque them automatically for you, placing them successful the close place. You don’t person to interest astir wherever your XML sitemap should beryllium placed and astir optimizing them for hunt engines.

While we worked with Google to bring XML sitemaps natively to WordPress, we connection a superior mentation of sitemaps successful Yoast SEO. The WordPress 1 is basic, not astir arsenic fine-tuned, and afloat featured arsenic the 1 successful Yoast SEO. If you instal Yoast SEO, we automatically disable the WordPress sitemap for you.

Yoast SEO creates an XML sitemap for your website automatically. Click connected ‘SEO’ successful the sidebar of your WordPress instal and past prime the ‘Features’ tab:

You tin find the XML sitemaps successful the Features tab of Yoast SEO
Click connected the nexus to spot the XML sitemap of your site

In this screen, you tin alteration oregon disable the antithetic XML sitemaps for your website. Also, you tin click connected the question people to grow the accusation and spot much possibilities, similar checking your sitemap successful your browser.

You tin exclude contented types from your XML sitemap successful the ‘Search Appearance’ tab. If you prime ‘no’ arsenic an reply to ‘show X successful the hunt results?’, this benignant of contented won’t beryllium included. You tin besides bash this for idiosyncratic posts and pages by going to the Advanced settings successful the Yoast SEO meta container oregon sidebar and selecting an enactment successful the ‘Allow hunt engines to amusement this Post/Page successful hunt results?’

Determine what you privation to spot successful the XML sitemap

Read much astir excluding contented types here.

Frequently asked questions astir XML sitemaps

There are a batch of questions regarding XML sitemaps, we’ve answered a mates successful the FAQ below.

What happens erstwhile Google Search Console says an XML sitemap has errors?

If the XML sitemap isn’t valid, oregon if it’s not being work correctly by hunt engines, you indispensable find retired what benignant of mistake is listed. If hunt engines aren’t speechmaking the XML sitemap, guarantee it’s submitted to the hunt motor webmaster tools. If it’s not valid, cheque the errors and marque definite to find the circumstantial solutions to your issue. 

How to cheque if a website has an XML sitemap?

In astir cases, you tin find retired if sites person an XML sitemap by adding sitemap.xml to a basal domain. So, that would beryllium example.com/sitemap.xml. If a tract has Yoast SEO installed, you’ll announcement that it’s redirected to example.com/sitemap_index.xml. Sitemap_index.xml is the basal sitemap that collects each the idiosyncratic sitemaps connected your tract connected 1 page.

How tin I update an XML sitemap?

There are ways to marque and update your sitemaps by hand, but we wouldn’t o.k. of that. Also, determination are static generators retired determination that assistance you marque a sitemap astatine immoderate fixed moment. But, again, this process would request to repetition itself each clip you adhd oregon update content. The champion mode to bash this is by simply utilizing Yoast SEO. Turn connected the XML sitemap successful Yoast SEO and tract backmost — each your updates volition automatically happen. 

Can I usage <priority> successful my XML sitemap?

In the past, radical were definite that adding the <priority> property to sitemaps would awesome to Google that circumstantial URLs would request to beryllium prioritized by Google. Unfortunately, <priority> doesn’t bash anything, arsenic Google has often mentioned that they bash not usage this property to work and prioritize contented recovered successful the sitemaps.

Check your ain XML sitemap!

Now, you cognize however important it is to person an XML sitemap: having 1 tin assistance your site’s SEO. If you adhd the close URLs, Google tin easy entree your astir important pages and posts. Google volition besides find updated contented easily, truthful they cognize erstwhile a URL needs to beryllium crawled again. Lastly, adding your XML sitemap to Google Search Console helps Google find your sitemap accelerated and allows you to cheque for sitemap errors.

So cheque your XML sitemap and find retired if you’re doing it right!

Assess your method SEO fitness

Having a bully XML sitemap is portion of your method SEO. Curious however acceptable your site’s wide method SEO is? We’ve created a technical SEO fittingness quiz that helps you fig retired what you request to enactment on!

Meike Hendriks

Meike Hendriks is simply a UX Researcher and integer marketer astatine the Yoas. She works connected User Research, Usability Testing, User Testing and Product selling to continuously amended Yoast.com and each Yoast products.

Avatar of Meike Hendriks