Hello reader today we will discuss add multiple sitemap into one in Website.
What is sitemap : An XML sitemap contain the website URls.
It can have a maximum of 50,000 URLs, and an uncompressed file size limit of 50MB.
When we exceed the limit, we will need to split our URLs across multiple XML sitemaps.
These sitemaps can then be combined into a single XML sitemap file.
Sitemap use for the SEO purpose and search engine robots to crawl your URLs more intelligently.
For example we have 3 sitemap in single website.
- 1. sitemap.xml
- 2. sitemap_2.xml
- 3. sitemap_3.xml
Main sitemap file is sitemap.xml rest all others.
Below code is example of sitemap_2.xml and sitemap_3.xml files into one sitemap.xml.
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<sitemap>
<loc>https://example.com/sitemap_2.xml</loc>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap_3.xml</loc>
</sitemap>
</sitemapindex>
Final sitemap url will like this : https://example.com/sitemap.xml
Note : sitemapindex, sitemap and loc are the XML tags.
Related Post on Encrypt decrypt in php with salt
I love your writing style truly enjoying this internet site.
Very interesting info !Perfect just what I was looking for!