• ADS
• CSS
• EXCEL
• IMAGE-SERVER
• SCRIPTS
• SEO
• WEB-PAGE-LANGUAGES
• WEB-SERVER
• WEBSITE-MONITORING-AND-BACKUP
SEO |
SITEMAP |
BASIC
What is an XML sitemap?
It is a list of a website's URLs. It shows how the website is structured and what the website includes. The term "XML" stands for "Extensible Markup Language", a way of displaying information on websites.
Why an XML sitemap is necessary for a website?
Search engines use crawlers to organize and index information on the web. These crawlers can read all kinds of information. But an XML sitemap makes it easy for the crawler to see what's on your website and index it. An XML sitemap works, essentially, as a table of contents for your website, allowing the crawler to get the essentials and index your site accordingly.
Example of Well structured XML Sitemap
Sitemaps tell search engines when a page was updated, the frequency of updates to the page, the relative importance of pages within a website, and how to find and index content that may be found deep within the site's structure.
- Where the page is located on the website (its URL): <loc>http://www.example.com/mypage</loc>
- When the page was last changed: <lastmod>2013-10-10</lastmod>
- How often the page is changed: <changefreq>monthly</changefreq>
- What priority the page has in relationship to other pages on the site: <priority>0.8</priority> or <priority>1</priority>
How to Create XML sitemap?
First collect all links of your website, that you want to put on sitemap. Then create a page like this and save it as .xml
Note: Sitemap URLs, like all values in your XML files, must be entity escaped.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com/mypage1.html</loc>
<lastmod>2020-12-04</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.example.com/mypage2.html</loc>
<lastmod>2020-12-04</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.example.com/catalog?item=73&desc=vacation_new_zealand</loc>
<lastmod>2020-12-03</lastmod>
<changefreq>weekly</changefreq>
</url>
</urlset>
- urlset - Encapsulates the file and references the current protocol standard.
- url - Parent tag for each URL entry. The remaining tags are children of this tag.
- loc - URL of the page. This URL must begin with the protocol (such as http) and end with a trailing slash, if your web server requires it. This value must be less than 2,048 characters.
- lastmod - The date of last modification of the file. Format: YYYY-MM-DD. Note that this tag is separate from the If-Modified-Since (304) header the server can return, and search engines may use the information from both sources differently.
- changefreq - How frequently the page is likely to change. This value provides general information to search engines and may not correlate exactly to how often they crawl the page. Valid values are: always / hourly / daily / weekly / monthly / yearly / never. The value "always" should be used to describe documents that change each time they are accessed. The value "never" should be used to describe archived URLs.
- priority - The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. It only lets the search engines know which pages you deem most important for the crawlers. The default priority of a page is 0.5. Please note that the priority you assign to a page is not likely to influence the position of your URLs in a search engine's result pages. Search engines may use this information when selecting between URLs on the same site, so you can use this tag to increase the likelihood that your most important pages are present in a search index. Note that assigning a high priority to all of the URLs on your site is not likely to help you.
You can provide multiple Sitemap files, but each Sitemap file that you provide must have no more than 50,000 URLs and must be no larger than 50MB (52,428,800 bytes) in uncompressed form. If you would like, you may compress your Sitemap files using gzip to reduce bandwidth requirement. The tag <lastmod> is completely optional here. Save the following file as .xml extension.
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>http://www.example.com/sitemap1.xml.gz</loc>
<lastmod>2004-10-01</lastmod>
</sitemap>
<sitemap>
<loc>http://www.example.com/sitemap2.xml.gz</loc>
<lastmod>2005-01-01</lastmod>
</sitemap>
</sitemapindex>
- sitemapindex - Encapsulates information about all of the Sitemaps in the file.
- sitemap - Encapsulates information about an individual Sitemap.
- loc - Identifies the location of the Sitemap.
- lastmod - It identifies the time that the corresponding Sitemap file was modified. It is optional. Format: YYYY-MM-DD. By providing the last modification time, you enable search engine crawlers to retrieve only a subset of the Sitemaps that were modified since a certain date. This incremental Sitemap fetching mechanism allows for the rapid discovery of new URLs on very large sites.
To learn more about sitemap protocol, click here