13782 1
How-to 11 min read November 26, 2019

How to create a sitemap for Google

How to create a sitemap for Google
Фото Евгении Кривко, Head of SEO в интернет-агентстве CyberShark
Eugeniia Kryvko
Head of SEO at CyberShark
The XML sitemap is a guide to a web resource for search robots and sometimes for users. It's recommended for users to create a site map in HTML format, but I don't know a single person who has used it at least once in the last five years.
Google recommends having both versions of the sitemap on the website for a good indexing. But if you're not a perfectionist, you can develop well-designed site navigation instead of having a sitemap. But don't sacrifice the development and customization of a XML sitemap, even if your site has got only 10-20 pages so far. Although if it's a one-pager site, then the sitemap does not make any sense.

Why is an XML sitemap so important?

Without sitemap search engines have to:

  • search for recently added pages on your site;
  • identify changes on the old pages of your web resource;
  • determine which pages should have prioritized indexing and which not;
  • set the frequency of page indexing.

It's quite "stressful" for search crawlers (I think they crunch enough with the number of websites on the Internet, especially when today there are billions of websites). Therefore, without clear instructions, they do it carelessly.
What happens when there is no sitemap on the site?
This is what happens:
404 error example
"No sitemap, but please don't panic" the search bots see and safely leave, indexing a couple of random pages on the website and just skip everything else.

To prevent this from happening, there are several convenient ways to develop a sitemap.

Services for building XML Sitemap

There are many online services and software for generating a sitemap. The most popular among them are MySitemapGenerator. However, such services have drawbacks that can make all these efforts pointless:
1
Most services have a restriction on adding URLs; for example, MySitemapGenerator allows you to generate a file for only 500 pages for free, and then you will have to pay extra for every next page.
2
The created map will not be dynamic; every time you add new materials/products/articles to the website, you will have to redo it.
Actually, the second point is more confusing than the first; what is the point of creating a sitemap for a daily updated blog or an actively growing online store if you have to redo it regularly and reload it to the server?

At CyberShark, we haven't been considering it for a long time because we mainly work with Wordpress (for service websites, information portals, company sites) and OpenCart. These systems, fortunately for programmers (who don't need to do anything) and the enthusiasm of SEO specialists, have built-in tools to make a sitemap on your own.

We are really concerned about the internal site optimization, and therefore we are trying to do the sitemap with pinpoint accuracy so that search engines have nothing to complain about.

General rules for building an XML sitemap

1
Must be available at site.com/sitemap.xml, where site.com is your domain. If your sitemap is generated with a different URL, it's not a problem; you just set a 301 redirect from site.com/sitemap.xml to the Sitemap address where it opens correctly.
2
It should look like a list of website links as in the example below:
Скриншот показывает, как должна выглядеть карта сайта
3
It must not conflict with robots.txt file. By "conflict", I mean "don't confuse the search robot": if you close some pages from indexing in robots.txt, then they should not be on the sitemap either.
4
An XML sitemap should contain no more than 50 thousand links. If there are more links, there are three options to solve the issue:

  • split the map into several parts (for example, by page type or taxonomy);
  • compress the sitemap using the archiver so that it has the .gz extension;
  • analyze what types of pages you don't need in the sitemap and delete them (in case your service pages or URLs automatically generated by filters and sorting get to your sitemap).
5
The map should "weigh" no more than 10 MB. Otherwise, we use the methods mentioned in the previous paragraph.
6
There shouldn't be 404 errors and test pages in the sitemap. If you deleted something from the site or carried out experiments, make sure that this garbage doesn't go into the file.

How to generate a sitemap using CMS tools?

You can choose your own services for each CMS.
Wordpress instructions
I have a special attitude for WordPress because in this CMS, you can do 90% of your work, and you don't need to hire a developer. You can also generate a sitemap.

Step 1: Install the Yoast SEO Plugin
If you still don't have this magic plugin on the WordPress website, then install and activate it ASAP; it's not even a real chatty, it's a bunch of useful chips for the SEO specialist (especially for a lazy person like me).
WP Yoast SEO plugin for Wordpress
Step 2: Go to the "XML sitemap" section and configure the sitemap

After activating the plugin, go to SEO settings and select the XML sitemap:
Creating an XML sitemap for wordpress site
Here we configure the most important thing:

1)
Set the maximum number of URLs added to one map (by default there are 1000, but you can set up to 50,000):
Max entries per sitemap in Wordpress
2) Exclude unnecessary page types and taxonomies from the map (for example, if you don't want to have tag pages or media files indexed):
Page types and taxonomies in sitemap by yoast seo
3) Press the "On" button:
Yoast SEO XML sitemap
That's it! WordPress sitemap is ready.

What is most convenient in this plugin?

  • by default, this plugin distributes URLs into three different folders by page type; Yoast thrives for the future and believes that your website is growing huge, so one sitemap won't be able to do much:
Sub-sitemaps example
  • the sitemap is generated in user-friendly form like this:
User-friendly sitemap with folders
If, for some reason, the SEO specialist or content manager needs to download all publications of the site, he can easily do this using the Sitemap XML generated by Yoast. At the same time, this format is also quite understandable to the search bot.
The hidden rock:
This plugin does not have an option to adjust the frequency and priority of indexing. If you need these details (for instance, when there are tens of thousands of pages on the website, and they are big enough), you should reach out for a developer to help you.

But from my own experience, I can say that Google-bots appreciate this sitemap as well. The most important thing is simply to have it.
OpenCart instructions
I seriously consider OpenCart to be the best free CMS for online store development, in particular, because it's simple to optimize the website so that it meets search engine requirements.

OpenCart's XML sitemap is also pretty simple. The Google Sitemap module will help us with this.
Step 1: Check if there is a Google Sitemap module in the admin panel of the website

Go to Extensions and choose the extension type "Feeds" →
Google Sitemap checking in OpenCart admin panel
If a developer did not delete the default module, then you will immediately see it, but if it's not there, you need to download the module from the official OpenCart website and install it by following the instructions in the admin panel (in the "Installing Extensions" section).
Step 2: Activate and Customize the Google Sitemap

Opposite the module name, click "Activate" (if it's disabled), and then click "Edit":
How to activate Google sitemap for Opencart
In the next window, select "Enabled" and save the changes:
Google sitemap status checking in Opencart
What is most convenient: there is not much to do, the sitemap is configured in just 3-4 clicks.
The hidden rock:
1. The URL that you see in the screenshot above is the address where the sitemap will be available. It hardly fits the description of "CNC", which makes many SEO specialists confused. There are two options to solve the issue:

  • ask the developer to configure the sitemap at nice-looking URL at site.com/sitemap.xml;

  • just don't pay attention to this and configure a redirect from site.com/sitemap.xml to this bad-looking, but acceptable URL address (unlike the map generated by the Yoast SEO plugin in WordPress, there is no automatic adding of redirect).

2. Make sure that page duplicates don't get to the sitemap (remember I mentioned about "crunching" for crawlers?). The best thing is to ensure that the CMS doesn't generate duplicate pages, even at the time of website development. This, in turn, can be solved by setting redirects or by the canonical attribute, but that's another story.

Next steps once the sitemap is generated

When all the steps to generating XML Sitemap have been completed, there are two things you must remember to do.
1
Add the link to the sitemap to the robots.txt file. It looks like this:

Sitemap: http://site.com/sitemap.xml

If your sitemap URL is different, paste here the one by which the bot will immediately find it. Don't make him surf through unnecessary redirects.
2
Add your sitemap to the Google Search Console
Adding a sitemap to Google search console
When adding, you can also test the site map; we recommend to do this. This is the fastest way to understand if a file is generated correctly. Another way is to validate it with a validator like XML Sitemaps.
Instead of a summary
Don't think that if you made a sitemap, it will serve you forever. Check the URL availability regularly and don't forget to look into the webmaster panel.

We wish you fast indexing and high ranking!

Speed up your search marketing growth with Serpstat!

Keyword and backlink opportunities, competitors' online strategy, daily rankings and SEO-related issues.

A pack of tools for reducing your time on SEO tasks.

Get free 7-day trial

Rate the article on a five-point scale

The article has already been rated by 1 people on average 5 out of 5
Found an error? Select it and press Ctrl + Enter to tell us

Discover More SEO Tools

Tools for Keywords

Keywords Research Tools – uncover untapped potential in your niche

Serpstat Features

SERP SEO Tool – the ultimate solution for website optimization

Keyword Difficulty Tool

Stay ahead of the competition and dominate your niche with our keywords difficulty tool

Check Page for SEO

On-page SEO checker – identify technical issues, optimize and drive more traffic to your website

Share this article with your friends

Are you sure?

Introducing Serpstat

Find out about the main features of the service in a convenient way for you!

Please send a request, and our specialist will offer you education options: a personal demonstration, a trial period, or materials for self-study and increasing expertise — everything for a comfortable start to work with Serpstat.

Name

Email

Phone

We are glad of your comment
I agree to Serpstat`s Privacy Policy.

Thank you, we have saved your new mailing settings.

Report a bug

Cancel
Open support chat
mail pocket flipboard Messenger telegramm