Sitemap
What is a sitemap? The sitemap.xml
A sitemap is a file that compiles the list of web pages that make up a website, and provides information about the different files on the website, as well as the relationships between all of them. They are especially useful so that search engine crawlers can index the website more efficiently.
A sitemap file, in its basic form, is saved as sitemap.xml and is usually hosted at the root of the website, for example:webdeejemplo.com/sitemap.xml , although this is not a mandatory rule. There is also the possibility, among others, of using a sitemap with an .html extension (sitemap.html), but the most popular one due to its importance for SEO is: sitemap.xml.
1. Is a sitemap necessary?
Yes, having a sitemap is always advisable and very valuable. It doesn’t matter whether you think you have a small website (fewer than 500 pages), that you don’t have many media files (images and videos) on your site, or that your internal linking is perfect… it is vital so that search engine spiders can index you according to your needs.
That said, let’s define two scenarios in which having a sitemap stops being merely advisable and becomes mandatory if you want to help your website’s ranking:
- When you have a very large website. Since it’s quite possible that web crawlers may overlook some of the new pages (and their content) that you’ve recently added to your site, or fail to index the ones that have been recently updated.
- If it’s a new or recently created site. It will then have few external links pointing to it (backlinks), which makes it harder for web crawlers to detect your pages. The sitemap will speed up this indexing process.
2. Example of sitemap.xml
Let’s give a very simple example so you can get an idea of what a sitemap.xml file looks like. You can see its general structure, and in this case, it only declares the location of one URL and its update date:
<?xml version="1.0" encoding="UTF-8"?>
<urlset >
<url>
<loc>http://www.miwebdeejemplo.com/miprimeraweb.html</loc>
<lastmod>2022-07-07</lastmod>
</url>
</urlset>
3. How to create a sitemap?
You can create a sitemap with the help of various tools; let’s look at the most common ways to have a sitemap:
- Create it automatically from a CMS. If you use some type of CMS (content management system), it’s very likely that it has already created one for you automatically. But you should check that it fits what you want, and for that you can use complete WordPress tools such as Yoast SEO or Better WordPress Google XML Sitemaps.
- Create it manually. This is a task that guarantees it will be exactly as you want it, for which you only need a plain text editor such as Windows Notepad or Nano (Linux and macOS). That said, you must follow the appropriate syntax, which you can check in The Sitemaps protocol.
- Generate it automatically (online or with an application). There are online tools you can use to generate the sitemap.xml without any experience or installing anything, such as XML-sitemaps.com. They can also be generated with applications specialized in this task, such as GSiteCrawler or Sitemap Generator.