What is a sitemap and how to make a basic sitemap?


What is a sitemap and how to create it?

What is a sitemap and how to create it?

In this article, we will explain what sitemap.xml is and how important it is in SEO, and how to create a basic sitemap?

How do Google bots navigate between multiple pages, detect and index when they enter your site? Where to go from where? How to value pages?

In fact, sitemap is a file that contains a list of the most important content on the site so that Google's crawlers can easily see and index these content.

Therefore, having a sitemap is considered an important part of the process of SEO and optimization of your site, and sitemap construction is done in the technical SEO section of the site.

Stay with us on the KeyUpSeo blog to learn more about it and learn how to create a sitemap in a basic way.

Important points about sitemap

As mentioned, the sitemap is actually a file that contains a list of the most important content on the site so that Google's crawlers can easily see and index these content. Also, sitemap tells search engines which content is more important than others.

In contrast to this type of sitemap, there is another type of sitemap that is based on HTML and contains a list of the most important files on the site. This type of site map is mostly used for users so that they can find and use the content on the site.

Search engines use sitemap.xml to learn the structure of sites. You should remember that putting the URL of the site pages in the sitemap guarantees the indexing of the site.

This means that if a sitemap uses good XML codes, provides valid and orderly URLs for crawlers, and meets other search engine requirements, the URLs in it will be considered in subsequent crawls. This increases the chances of various pages being seen in search engines.

Does the site need a sitemap?

Although the sitemap will be useful for the website in any situation, it is very effective and efficient in the following situations:

  • You have a new site with new pages that are not well linked yet (internal and external links). You know that Google bots and other web crawlers follow links and go from page to page; So if your site does not have links, they may not find your pages.
  • If your site's pages are very difficult to recognize or have heavy non-text content, such as Flash.
  • You use dynamic URLs for your content on your site.
  • Your site is really big and Google's crawlers might miss crawling some of your updated pages.
  • The archived content of your site is not well linked to the active pages.

It can be said that sitemaps are actually a tool to feed and introduce the site to search engines.

Sitemap.xml structure

All major search engines use the official XML protocols defined at Sitemaps.org. You can see an example of the XML code used in the sitemap below:

<?xml version="1.0" encoding="UTF-8"?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>

<loc>http://www.example.com/</loc>

<lastmod>2024-02-29</lastmod>

<changefreq>monthly</changefreq>

<priority>1.0</priority>

</url>

<url>

<loc>http://www.example.com/about-us.html</loc>

<changefreq>yearly</changefreq>

<priority>0.4</priority>

</url>

</urlset>

XML sitemap codes include optional and required tags. Valid XML tags begin with the opening (opening) "<?xml>" tag, which is a required tag. This tag is then followed by another "<urlset>" tag that contains at least one Xmlns attribute that defines the overall structure of the XML.

Every address placed in the sitemap must have two <url> tags and one <loc> tag. The rest of the tags are optional.

Now we explain the tags used in the XML sitemap.

tag <?xml>

The opening tag of the file requires the following two things:

• version=”1.0″

• encoding=”UTF-8″

tag <urlset>

This tag is required and can only be used once. The sitemap starts with this tag and closes at the end of the map.

• xmlns=” http://www.sitemaps.org/ schemas/ sitemap/ 0.9″

  • Pictures:

xmlns:image= http://www.google.com /schemas/ sitemap-image/1.1

  • video:

xmlns:video=”http://www.google.com/schemas/sitemap-video/1.1″

  • Mobile:

xmlns:mobile=”http://www.google.com/schemas/sitemap-mobile/1.0″

  • Code search:

xmlns:codesearch=” http://www.google.com /codesearch/ schemas/ sitemap/ 1.0″

  • News:

xmlns:news=” http://www.google.com /schemas /sitemap-news/ 0.9″

tag <url>

This mandatory and parent tag is used for each of the addresses. The rest of the tags are placed inside this tag.

tag <loc>

The exact address of the site pages is placed in this mandatory tag. Use the full address that contains the protocol and this address should not exceed 2048 characters.

tag <lastmod>

In this optional tag, the date of the last update of the desired page is written in the form of YYYY-MM-DD.

tag <changefreq>

This optional tag specifies how often this page should change. This value provides some general information to search engines that may not be related to the number of times Google crawls.

Valid values include the following:

  • Always (changes whenever the page is available.)
  • Hourly
  • Daily
  • Weekly
  • monthly
  • yearly
  • Never

tag <priority>

This optional tag is the level of priority and importance of a page compared to other pages of the site. Valid values range from 0 to 1, with a default value of 0.5.

Sitemap.xml structure

Sitemap file format and its types

Google and Bing search engines have adopted XML format for sitemap as a protocol. However, they also accept sitemap feeds that use the RSS 2.0, Atom 1.0 protocols, and ASCII text files.

The sitemap can also be used in XML form or compressed using Gzip tool if it has a large volume.

In addition to sitemap standards for web content, Google supports specific sitemap formats that are used for specific media. These include maps for video files, images, mobile content, software source code, and news content. After the proper format of the site map is announced in the namespace, all other additional content can be added to it.

Important points about the sitemap file format

The Bing search engine does not support the formats supported by Google, but a Bing official has stated that anything that is not supported will be ignored. Therefore, webmasters can easily use these items in their sitemap.

Google recommends that you consider the sitemap containing news content as a separate file because this type of sitemap is crawled more than other files.

If your site's SEO is important to you, you must be careful in creating a basic sitemap to increase Google traffic for your site by improving SEO.

Google and Bing search engines use Media RSS files as an alternative to recognize the meta description of video files. Since Bing also supports this type of file, developing an mRSS video feed will be a smart solution to avoid wasting your time.

Limitations in the sitemap file

It is better to know that there are rules and restrictions in the site map file. These restrictions include the following:

  • Namespace or namespace

The sitemap must have a namespace and specify the default namespace well: xmlns=http://www.sitemaps.org/schemas/sitemap/0.9

  • Limitation in size

The sitemap file should not contain more than 50,000 addresses. The size of this file should not be more than 50 MB. If you have more than 5000 addresses, use the sitemap index file described in the next section.

  • Text requirements

The sitemap file must be in UTF-8 format and use entity-escaped characters in the URL (for example, replacing the "&" character with the "&amp;" character in dynamic addresses).

  • Addresses with the same form

All addresses that are written in the sitemap must follow the same rules. This means that URLs starting with WWW cannot be combined with URLs without the WWW prefix. Also, don't put addresses that have session ID in this file.

  • Location

A sitemap file stored in a directory can only display addresses stored in that directory or its subdirectories. Addresses in parallel directories, parent directories, different subdomains, or those using a different protocol are not valid references. Storing the sitemap in the root directory can prevent invalid references.

  • Healthy links

Note that your sitemap should not have more than 1% link errors. Otherwise, the whole plan is thrown away. A link error is any type of HTTP response code, including 404 redirect for broken links and 301 and 302 redirect for redirected links. This is also a well-known rule for Bing. Using correct links is mandatory in SEO rules for all search engines. You can check the HTTP response code for any URL using the Header Checker tool. For multiple addresses on a site, tools such as Find Broken Link Redirects & Google Sitemap Generator Free Tool can be used.

Sitemap index file

Most large sites have more than 50,000 URLs, which are very important to be indexed by search engines. Since only 50,000 addresses are allowed in the sitemap, webmasters can create a sitemap index file for themselves. A sitemap index file can have more than 50,000 entries.

In theory, this means you can store up to 2.5 billion addresses in your file. The XML code structure of the index file is very similar to the sitemap. You can see the sample XML code of the site map index file below:

<?xml version="1.0" encoding="UTF-8"?>

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<sitemap>

<loc>http://www.example.com/sitemap01.xml</loc>

<lastmod>2024-02-29</lastmod>

</sitemap>

<sitemap>

<loc>http://www.example.com/sitemap02.xml</loc>

<lastmod>2024-02-29</lastmod>

</sitemap>

</sitemapindex>

Like the standard sitemap format, the index file also contains mandatory and optional tags. In a valid index file, the XML code starts with the standard opening tag. This tag will be followed by the "<sitemapindex>" tag, which contains the "xmlns" attribute that defines the general XML schema of the index file.

Each sitemap in the index file needs a <sitemap> tag and a <loc> tag inside it. You can see the tags used in the sitemap index file below:

tag <?xml>

The starting tag of the file contains the following attributes:

• version=”1.0″

• encoding=”UTF-8″

tag <sitemapindex>

Used only once. This tag contains the required namespace attribute.

xmlns=” http://www.sitemaps.org/ schemas/ sitemap/ 0.9″.

tag <sitemap>

A parent tag has been added for each address. The rest of the tags are placed inside this tag.

tag <loc>

The address is the site map. Use the full address that contains the protocol.

tag <lastmod>

In this optional tag, the date of the last update of the desired page is written in the form of YYYY-MM-DD.

Creating a site map and introducing it to Google

The process of applying a sitemap and making it available to search engines is very simple. Of course, it depends on what CMS or content management system you use.

Creating a sitemap in WordPress

If you use a WordPress site, you can easily create a sitemap for your site with the Yoast SEO plugin by clicking a button! Just go to the SEO section of your site's dashboard, select Features from the top menu; Then enable the site xml maps option.

If you click on the question mark of the sitemap option, you will be able to see your sitemap or sitemaps and make sure it is correct.

Creating a sitemap in WordPress

By clicking on view sitemap, all your sitemaps will be shown as a list.

A great advantage of using Yoast to create a sitemap is that this map is dynamic, that is, your sitemap is automatically updated with the addition of new pages. If you don't use Yoast, there are other plugins like Google XML Sitemaps that help you to create a sitemap.

Other content management systems have their own plugins that automatically create sitemaps.

Create a site map with additional tools

If you don't use WordPress and have a dedicated CMS, don't worry at all. You can use a sitemap generator tool like XML-Sitemaps that will easily do this for you. Just enter the XML-Sitemaps site and enter your site's address in the specified box. After a few seconds, receive the ready sitemap file.

There are other online tools that you can use to generate a sitemap file, such as:

  • SLICKPLAN
  • DYNOMAPPER
  • POWERMAPPER
  • MINDMUP
  • WRITEMAPS

Introducing the sitemap to Google

Unlike the robots.txt file, search engines cannot automatically search for and read the sitemap. Therefore, you have to manually provide this provider to Google.

I suggest you read Important tips for creating Robots.txt file.

To introduce the sitemap to Google, log into your site's search console account, select the sitemap option from the left menu. If you have already registered your sitemap in Google, you will see the image below.

Introducing the sitemap to Google

If there is no file already in this section, put the address of your file and click the Submit button.

make a basic sitemap

If everything is set up correctly, you will see your sitemap information in the submitted maps section.

After some time, click on the submitted file, if the message "Sitemap index processed successfully" is displayed, it means that Google has checked and approved your site.

What is a sitemap and how to make a basic sitemap?

You can click on the "SEE INDEX COVERAGE" button on the top right to see the Google reports of your sitemap. This report shows you how many pages Google has found and how many of them have been approved by Google


Release date : 23 March, 2024

Categories

SEO

SEO

Google Ads

Google Ads

Digital Marketing

Digital Marketing

Social Media

Social Media

WordPress content and other articles

WordPress content and other articles

Similar contents

Full description about sitemap

Full description about sitemap

In fact, sitemap is a file that contains a list of the most important content on the site so that Google's crawlers can easily see and index these content.

SEO

23 March, 2024

Are you familiar with the types of SEO keywords?

Are you familiar with the types of SEO keywords?

In order to have a content strategy and optimize your website, you must be familiar with the types of keywords in SEO

SEO

20 November, 2023

Why is it important to focus on a few keywords?

Why is it important to focus on a few keywords?

Focusing on keywords is very important when optimizing your content, and we will discuss this in this article.

SEO

19 October, 2023