SEO: a guide for creating an XML sitemap for your website

DecorativeDecorativeDecorativeDecorativeDecorativeDecorativeDecorativeDecorativeDecorativeDecorativeDecorativeBlue Dot

Sitemap in XML format – a valuable SEO optimization tool. It’s a guide for the search engines, and sometimes for users as well. For users, it is recommended to make a sitemap in HTML format, but we do not know a single person who would have used it at least once in the last 5 years.

Why is an XML sitemap so important?

Google recommends that you have both sitemaps on your site for a good WordPress SEO optimization. SEO-wise, a sitemap XML is a must-have file on your website, even if it consists of 10-20 pages.

In the absence of a map, search engines have to:

  • search for newly appeared pages on your site;
  • find changes on the old pages of your web-resource;
  • determine which pages to index priority, and which – no;
  • set the frequency of indexing pages.

All of this for search engines crawlers is quite “stressful” (we believe that they are “straining” with the number of sites on the Internet, which today amount to billions). Therefore, without clear instructions, they do it “slipshod”.

Google sitemap on laptop

General rules of how to create sitemap

  1. Must be available at site.com/sitemap.xml, where site.com is your domain. If your site map is generated with a different URL, there is nothing military here – just put 301 redirects from site.com/sitemap.xml to the address of the Sitemap where it is opened correctly.
  2. It should look like a list of site links.
  3. Should not conflict with the robots.txt file. If you close any pages from indexing in robots.txt, then they should not be in the site map either.
  4. The XML Sitemap file should contain no more than 50 thousand links. If there are more links, there are three options for resolving the issue: split the map into several parts (for example, by page types or taxonomies); compress the sitemap with the archive so that it will have the .gz extension; analyze what types of pages you do not need in the sitemap and delete them (in case service pages or URLs automatically generated by filters and sorting get into your map).
  5. By volume, the card should “weigh” no more than 10 MB. Otherwise, we resort to those methods as in the previous paragraph.
  6. There should not be 404 errors and test pages in the sitemap. If you delete something from the site or conduct experiments – make sure that this garbage does not fall into the file.

How to create a sitemap in WordPress

We treat WordPress with a special love because in this CMS you can do 90% of the WordPress customization, without the need to hire a developer. Including customizing the sitemap for eCommerce sites.

Step 1: Install the Yoast – sitemap plugin for WordPress

If you still don’t have this magic plugin that is preferred by all WordPress experts, install it and activate it urgently – it enables your website with a range of SEO optimization functionalities.

Step 2: Go to the section “XML sitemap” and configure the generation of the sitemap

In the admin settings of the SEO settings that appear after activating the plugin, select the XML sitemap and enter the most important thing:

1) Set the maximum number of URLs added to one map (by default, they are 1000, but you can put more, up to 50,000);

2) Turn off unnecessary page types and taxonomies from a map (for example, if you don’t want tags or media pages to be indexed);

3) Press the “Enabled” button.

Voila! The sitemap on WordPress is ready.

What is convenient in Sitemap generated by Yoast:

  • By default, the plug-in distributes URLs into three different folders by page type – Yoast looks to the future with a confident look and believes that your site is growing to indecent sizes, and you will not be able to see just one sitemap.
  • The sitemap is generated in human-readable form. That is, if for some reason the optimizer or content manager needs to unload all the publications of the site, he can easily do this with the help of an XML Sitemap generated in Yoast. At the same time, this format is also quite understandable to the search bot.

Underwater rock

In the plugin, there is no possibility to adjust the frequency and priority of indexing. If you need these details (for example, when the number of pages of the site is calculated in tens of thousands and they are very voluminous), you should hire a web developer for that.

sitemap in wordpress yoast example

Steps to do after successfully creating a sitemap

When all the steps of setting up and generating a Sitemap XML are completed, it is important not to forget to do two things.

  1. Add a link to the sitemap file in the robots.txt file. It looks like this:
  2. Sitemap: https://site.com/sitemap.xml
  3. If your sitemap URL is different – insert here the one that the bot will immediately go to the site map. Do not force it to go through extra redirects.
  4. Add a sitemap in the Google Search Console. At the stage of adding it is proposed to test the site map – we recommend to do it. This is the fastest way to understand if a file is correctly composed. Another way to do this is to check it with a validator, for example, XML Sitemaps.

Regularly check the availability of your sitemap

Do not think that if you found out how to create a sitemap for website once, it will serve you forever and ever. Regularly check the availability of the URL in the address bar and look in the panel of webmasters.

We hope that our SEO optimization tips were useful for you. But if you still face any issue with WordPress SEO, our eCommerce SEO experts are always ready to help!

October 6, 2022
Webflow Blog [How-To]
DecorativeDecorative

Grow quickly with Webflow's unlimited development.

We do work, you do business.

DecorativeDecorativeDecorativeDecorativeDecorativeDecorativeDecorativeDecorativeDecorativeDecorative