Site map and everything we need to know from the sitemap.xml

The main purpose of website owners is to optimize their websites and get their website noticed by the Google search engine so that they can improve website ranking and increase traffic to their websites.

The main purpose of website owners is to optimize their websites and get their website noticed by the Google search engine so that they can improve website ranking Have you ever wondered how search engines measure the value of a website? How they crawl between different pages of a website and index them? Here are the answers to these questions.

You may have heard of Sitemap , it's good to know the value of Sitemap for ranking on search engine results and site optimization, it acts just like a map for bots.

Site map and everything we need to know from the sitemap.xml

What is a sitemap?

Sitemap is a file that contains information about the content of pages, photos and other important information of the website and the relationship between them that all search engines such as Google use this file to examine the website with more ability and awareness.

In other words, a sitemap is an XML file that contains a list of all the URLs. By using the sitemap you have access to more information about the URLs plus, they inform the search engines about the more important contents, which helps to Index websites easily. Search engines like Google use a program called spider.

Spider app:

The spider search engine is also known as a web crawler. In fact, it is an Internet bot that scans websites and stores important information for search engine indexing.

What is the reason of using the sitemap?

Sitemap allows Google bots to access the entire website without any size limit, these bots do not have the ability of a user to view and categorize the entire website separately, thus they help to optimize the search engine because they allow search engines to find the whole content that a webmaster wants to discover and index on their website and make the best use of the XML sitemap, which, as we mentioned, is a list of website URLs.

Where is the sitemap located?

All URLs listed in the sitemap should be located in the root directory of your website HTML server and your sitemap file should be located on the host and the main file folder.

Types of tags in the XML sitemap:

tag:

The tag is required, it encapsulates documents.

tag:

This tag is required and the rest of the tags are subsets of this one.

tag:

The tag is required as well and this URL should not exceed 2048 characters. In this tag, the URL of the web pages is mentioned.

tag:

This tag is optional and shows the date of the file last modification. It must also be in the W3C Datetime format, which allows you to delete the timeline and use YYYY-MM-DD if you wish.

tag:

The tag is optional as well, and indicates how much a page changes. The valid values ​​include, never, hourly, daily, weekly, monthly, yearly, always exist. For example, for archived URLs, the value “never” must be used.

tag:

This tag is optional and shows the importance of a page compared to other pages of the website. Valid values ​​are from 0.0 to 1.0 and shows search engines which pages you consider as the most important pages for crawlers. Also, the rank of a page is 0.5 by default.

Sitemap file format:

Search engines have adopted the XML format as the protocol, search engines also accept sitemap feed that uses the RSS 2.0, Atom 1.0, and ASCII text files.

Generally, a sitemap should:

Begin with an opening tag and end with a closing tag.

Specify the namespace (protocol standard) within the tag.

Include a entry for each URL, as a parent XML tag.

Include a child entry for each parent tag.

Other tags are optional and may be different in each search engine.

You should also pay attention to the points mentioned below:

1. tags are mandatory and , and tags are optional.

2. All URLs in the sitemap must belong to the same domain.

3. Sitemap cannot be larger than 10 MB in file size and can have a maximum of 50,000 URLs, if the points mentioned are not followed and a website contains more URL or larger file size, sitemap index should be created, the sitemap index file can contain up to 1000 sitemaps and can contain up to 10 MB of file size.

Note: Note that if the files are larger, use gzip compression.

In general, the points that should be considered in the site map are mentioned below:

Sitemap file size:

As we have mentioned before, the sitemap file should not contain more than 50,000 URLs and the size of this file should not be more than 10 MB. If you have more than 5000 URLs, the sitemap index file should be used.