sitemap.xml
A
sitemap.xml file is an XML file that helps search engines understand the structure of your website. Here’s a simple explanation of its components and how to create one:
Components of a sitemap.xml:
- URL Set: The main container for all URLs.
- URL Entry: Each URL entry includes:
- loc: The URL of the page.
- lastmod: The last modification date of the page.
- changefreq: How frequently the page is likely to change.
- priority: The priority of the page relative to other pages on the site.
Example of a simple sitemap.xml:
http://www.example.com/
2023-10-01
monthly
1.0
http://www.example.com/about
2023-09-15
yearly
0.8
Steps to create a sitemap.xml:
- List all the pages on your website.
- Choose the lastmod, changefreq, and priority values for each page.
- Format the entries in XML as shown in the example.
- Save the file as
sitemap.xml and upload it to the root directory of your website.
- Submit the sitemap to search engines via their webmaster tools