Best XML Sitemap Optimization for SEO

When optimizing your website for SEO, you need to try to give Google the right signals so it can index your site better, faster. XML sitemap optimization is a signal that can lead to faster indexing and higher rankings.

What is an XML sitemap and why is it needed?

Simply put, an XML sitemap is a file that lists all the important pages of your website that search engine crawlers need to know.

Even if you don’t have XML sitemaps they can still index your site, but having a sitemap makes that job of search engine crawling easier and also brings gives you the opportunity to tell it about the page and the component pages for them to explore easily.

Optimized XML sitemap for effective SEO

There are different types of sitemaps you can submit for your posts, images, and videos.

When is a sitemap really important?

  • For sites with multiple pages, a sitemap helps search engines discover new pages or update old pages with new content.
  • For sites that don’t use good internal linking, sitemaps are a great way to inform crawlers about your site.
  • For new sites that don’t have a lot of links, a sitemap will serve as a site-wide discovery tool.

How to create an XML sitemap?

There are many ways to create an XML sitemap. Many web platforms have this functionality built-in but even without it it is very easy to create it and take advantage of it.

To check if your site has a sitemap, you can open a new browser window and type in for example

It is important to understand that a sitemap is not a static file, it needs to be updated automatically when a new page is added to your site or when changes are made to existing pages.

For this reason, you should look for automated ways to create a sitemap.

For non-WordPress sites, the best way to create a sitemap is to look for plugins or software that are integrated with your platform and create sitemaps according to Google’s guidelines.

Read more:  7 important factors determining the success of SEO 2019

For WordPress sites, there are many free plugins that will help you. I send you below 2 Plugins that I usually use to get a standard sitemap.

The first is Plugins Google sitemap generator and one more plugin Yoast SEO.

Google sitemap generator – You can download and install the plugin from the WordPress plugin repository (THIS LINK). After you activate the plugin, there are several options to configure in SETTINGS -> XML-SITEMAP.

Yoast SEO – If you have already installed Yoast SEO then you don’t need another plugin to generate your XML sitemap, you can configure yoast SEO to do the job. Details below.

What’s the best XML sitemap for SEO?

Before getting into the actual configuration of the plugins above, it’s important to understand what you should include in your XML sitemap for best SEO optimization.

By default, the plugin will include all pages, posts, tags, categories, media… but this is not what we want for SEO purposes. Which we need to note the following:

  • Your sitemap including pages (and including articles) is important for your site. These are pages with high-quality content and are more likely to bring organic traffic to your site.
  • Exclude pages with duplicate content. For WordPress sites, it can be archive pages, tag pages, and author pages.
  • Exclude pages with ‘thin content’. When it comes to optimizing your website for search engines, you don’t want to submit low-quality index pages. This is not a counting game, which means it is not a matter of how many pages you have in the index but what matters is how many ‘good’ pages are in the index.

A good way to separate your ‘good sites’ from those that you don’t want included in the sitemap is to ‘don’t index’ the pages or add them to a specific exclusion category from the sitemap file web.

  • Organize your sitemap with additional subsitemaps. This has the added advantage of making sitemaps smaller and faster to process. Both of the plugins suggested above generate sitemaps in this format.
  • Submit a separate sitemap for your images and videos.
  • Add your sitemap to robots.txt. I explained in a previous post about your robots.txt and how to add it here: Introduction to WordPress SEO for Beginners, you can also add a line (as shown below) to make it easier for search engines to find your sitemap file.
Read more:  What are PA and DA metrics in SEO? What is important?

Add this at the top of your robots.txt:

Sitemap: or depending on the actual URL of your sitemap

Of course, if you are using women sitemaps then you can simply add the main sitemap, and the sub-pages with links in that main site.

  • Sitemaps include only URLs that are accessible to Google. If you have sites that are blocked by robots or are behind a password protected area, do not include them in the sitemap.
  • Make sure your XML Sitemap includes the ‘last modified time’ element, a value that tells Google when a page was last modified. This is useful in cases where you want Google to re-index some pages of your site when updated.

Generate XML sitemaps with the Google Sitemap Generator Plugins

As above I introduced this Plugins, if you want to use it, the first step is to download and install it on your Web site, after activating this Plugin, click on the XML-SITEMAP option and select SETTING

You can leave the default settings that are pre-configured by plugins, only the SITEMAP CONTENT option can be customized:

XML sitemap Google Sitemap Generator

As you can see in the screenshot above, I have excluded from the sitemap the archive pages, author pages, and tag pages. Also, I checked the ‘last modified time’ option.

Once you are done with the above settings, scroll down and click the UPDATE OPTIONS button.

Now you can navigate to, check your sitemap and if everything is ok you can submit it to Google.

Generate XML Sitemaps with Yoast SEO Plugin

One of the good features of Yoast SEO is the Sitemap function. If you have the plugin installed and activated, click on XML SITEMAPS in SEO.

The first thing to do is enable “XML sitemap functionality” by clicking Enable.

Next, go to POST TYPES and exclude post types that are not important for your site (eg Media pages). You need to do the same by going to TAXONOMIES, USER SITEMAP and exclude tags and possibly categories.

Read more:  What is the difference between Onsite and Offsite SEO?

Yoast SEO sitemap XML sitemap

Once done, go back to Tab GENERAL and SAVE CHANGES again!

How to submit an XML sitemap to Google?

There are two ways to make sure that Google gets your sitemap. The first way is to add it to robots.txt (as explained above) and the second way is to submit your sitemap in Google Webmaster tools. For best results, you can use both methods.

To submit your XML sitemap in Google Search Console:

Sign in to Google search console (


Click the ADD/TEST SITEMAP button located in the top right corner.

Load XML sitemaps for Google Webmasters

Once you do this, you will see that the sitemap is Pending. Check back in a few days to see how many pages were submitted with your sitemap and how many were actually indexed. At the present time, I find that Google has handled this faster, usually I load the sitemap in just a short time to see Google’s response.

Note: Usually Google won’t index all your pages especially if you add in sitemap page which doesn’t matter. This will give you some error links in the sitemap that Google has red flags in this dashboard.

When do you need to submit an RSS Feed to Google?

In addition to submitting an XML sitemap, there are circumstances where you can submit an RSS feed to Google.

When you have a large site with many pages that change frequently (eg News, Newspapers site), you can use RSS feeds to let Google know of new additions to the site. The RSS feed will be smaller and include only new pages (so it will be processed faster) while your sitemap will include ALL of your pages.

Conclusion and checklist

Having a valid XML Map that is readable by search engines is very important for SEO. Anything you can do to make the job of search engine crawlers easier and any other ways you can give them more information about structure and content of the site will enhance the site’s presence in their index.

Compilation: Phong Vu

Source link: Best XML Sitemap Optimization for SEO

Leave a Reply

Your email address will not be published. Required fields are marked *