Daniyal Javani
Daniyal Javani

Reputation: 235

include sitemap to one xml file

I have some files that create sitemap (such as sitemap-product.php, sitemap-company.php and etc). They are very big file!

I want create an XML file that include these address (sitemap-product.php, sitemap-company.php) then when I include this XML file to Google webmaster, Google check one by one these file.

Can I do that? Thanks for your help!

Upvotes: 0

Views: 257

Answers (1)

JPS
JPS

Reputation: 115

The XML version of the sitemap format looks like that shown below. I would recommend that you generate them using a sitemap generation tool rather than trying to hand code them. Search for sitemap generation tools on Google. I used http://www.xml-sitemaps.com/ to create the below snippet.

<?xml version="1.0" encoding="UTF-8"?>
<urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
      http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
  <loc>http://www.TEST.co.uk/</loc>
  <priority>1.00</priority>
  <changefreq>weekly</changefreq>
</url>
<url>
  <loc>http://www.TEST.co.uk/TEST.htm</loc>
  <priority>0.80</priority>
  <changefreq>weekly</changefreq>
</url>
<url>
  <loc>http://www.TEST.co.uk/TEST.htm</loc>
  <priority>0.80</priority>
  <changefreq>weekly</changefreq>
</url>
<url>
  <loc>http://www.TEST.co.uk/TEST.htm</loc>
  <priority>0.80</priority>
  <changefreq>weekly</changefreq>
</url>
</urlset>

You should call your XML sitemap 'sitemap.xml' and put it at the root of your web server.

If you add a reference to your sitemap to your robots.txt file then it should be found by the search engines automatically.

Upvotes: 2

Related Questions