To make your website work for your business, you need to work in detail on many of its parts. Visibility on the Internet can be ensured in different ways, for example, by engaging on social networks or paying for advertising. But one of the main methods of presenting the site to potential customers – is still indexing the pages in search engines.
You can have a beautifully designed site with many features and a well-designed interface by a professional UX/UI designer’s hands. You can regularly publish expert articles filled with keywords according to all canons of SEO, use plugins for optimization and correctly write meta tags. But there is another factor that must take into account – this file sitemap.xml. Experienced webmasters are well aware of what it is. And if you are creating your site and have not heard of Sitemap, this article is for you.
What is sitemap.xml?
Sitemap.xml is a sitemap that lists all the pages that need to be indexed by search engines. It is a file with a list of links with the extension .xml. By the way, you can create a Sitemap and in the form of a text file. Txt, but we’ll talk about it a little later.
Sitemap.xml is designed exclusively for search engines. Robotic systems can see what pages should be indexed, their priority, and the last update date with its help.
What are the components of the sitemap.xml file, and what does it look like?
A sitemap looks like a list of links with tags. The sitemap.xml file must always include the location of the page. Besides, you can specify the update frequency and priority.
Let’s try to model a sitemap. Suppose you have a simple single page. In the simplest case, if you write the Sitemap yourself in notepad, it will look something like this:
<urlset> <url> <loc>https://location-of-your-website.com/home</loc> </url> </urlset>
Here <urlset>, <url> and <loc> are required tags.
But you can also add how often the page is updated and when it was last modified. Then the Sitemap will look like this:
<urlset> <url> <loc>https://location-of-your-website.com/blog</loc> <lastmod>2021-11-8T08:30:01+01:00</lastmod> <changefreq>daily</changefreq>. </url> </urlset>
Let’s dwell on the newly introduced attributes:
<lastmod>. showed when changes were last made to the page.
<changefreq> defines the frequency of changes to the page. In our example, it says daily, which means daily changes. We can define any frequency, such as hourly, monthly, yearly, or always. You can also specify that the page never changes. This option is appropriate for old archived pages that search engines will still index.
You’ve decided to create another page for your blog. Now you can prioritize them. With it, the search robot will rank the pages according to the priority you set. There is a scale for this, with a minimum priority of 0.1 and a maximum of 1. If you do not prioritize yourself, the search engine will do it for you, and the priority of each page will be equal to 0.5.
The final view of the site map:
<urlset> <url> <loc>https://location-of-your-website.com</loc> <lastmod>2019-11-11T03:30:01+01:00</lastmod> <changefreq>daily</changefreq> <priority>1</priority> </url> <url> <loc>https://location-of-your-website.com/blog</loc> <lastmod>2020-10-10T03:30:01+01:00</lastmod> <changefreq>daily</changefreq <priority>0.6</priority> </url> </urlset>
The <priority> attribute is responsible for the priority. This code search engine will consider the main page of the site as a priority and not the blog.
But there is a second option. If Sitemap – a text document with the extension .txt, links will go in a row in a column. In this case, the file will be called sitemap.txt, and it will look as follows:
For such a one-page site, you can use this option. But if you need to specify the frequency of updates or highlight higher-priority pages, the only sitemap.xml will do.
Are there any limitations for sitemap.xml?
Yes, and there are several:
- The number of links. It is allowed up to 50 thousand links in one file.
- File size. The file must not weigh more than 50 MB.
- Location; will place the file in the root folder. The main nuance here is that the site map should be in the same directory with its links. For example, the file is located at https://location-of-your-website.com/catalog/sitemap.xml. This means that it can not be a link https://location-of-your-website.com/blog, but https://location-of-your-website.com/catalog/blog – can. And if the Sitemap is located at the link https://location-of-your-website.com/sitemap.xml, then it can include any page with the same domain.
- Domain. From the previous point comes one more limitation. The domain of the Sitemap and all links in it must be the same. You can not specify the address https://location-of-your-website.com
- /sitemap.xml in the file, following the link https://location-of-another-website.net
Protocol. If the link to the Sitemap looks like https://location-of-your-website.com/sitemap.xml, then the addresses specified in the file must have the HTTPS protocol. In the above case, it is correct – https://location-of-your-website.com/home, wrong – http://location-of-your-website.com/home.
The file should also include the robots.txt file. To do this, add a line with the file address. In the example in our article, it would look like this:
So Sitemap will be able to find robotic systems, which is the purpose of its creation.
How to create a sitemap.xml?
If your site is a business card with three pages, you can create a sitemap manually. For such resources will be sufficient and a text file with a list of links. For large resources, this option is not suitable. But the routine is easy to automate. To do this, you can use:
- Site map generator in CMS. If you use a content management system, the Sitemap will be generated automatically.
- A third-party sitemap generator. If you suddenly do not use a content management system or have your engine, you can use the generator sitemap.xml. There are many such proposals on the Internet, so you can safely choose a resource with good reviews. For small and simple sites are free versions of generators. And if your resource hundreds of thousands of pages, you have to pay, albeit a small amount of $ 2. Some service providers offer monthly payment plans so that the site map can be updated and dynamic. The costs will also not be high and will hardly exceed 5$/month. There are more expensive programs starting at $20, so you should check the price.
- Plugin. You can generate a sitemap with the help of an SEO-plugin. For example, YoastSEO. This is, without exaggeration, the most popular plugin for SEO optimization of a site on WordPress. You can also use narrowly targeted plugins, such as Google XML Sitemaps, it automatically generates a file, after which you only need to send a link to it to Google Search Console. We have already written about them in more detail when dealing with SEO-plugins for WordPress.
You can also create your script to generate a sitemap if you don’t want to use ready-made solutions.
How much does a sitemap affect its indexing in search engines?
We will not confidently state that the mere presence of a sitemap.xml file will bring your resource to the top of search results. However, Sitemap – is an essential component. It facilitates the scanning of your resource search engine crawlers, i.e., it works as a clue to the search engines.
Our verdict: the presence of sitemap.xml not always leads pages to the first lines in search results but helps them not fall to the last. Without it, you can not do it, especially if you are serious about promoting your site. And you can not do without good hosting. If your resource is not enough of shared hosting resources and you are looking for more powerful options. We offer VPS/VDS hosting and offer several rates depending on your website needs – contact us to choose the best variant for you!