A sitemap isn't a single file—it's two files. One is an XML file located in the root directory for search engine crawlers to read; the other is an HTML file displayed on the webpage for users to view. Since their purposes differ, so do their formats.
I. XML Version: Telling the Crawler Which Pages to Index
An XML sitemap is essentially a list, with each entry containing a URL and, optionally, the date of the last modification. It is placed in the website's root directory, and the filename is typically sitemap.xml.
There are three ways to generate them:
- Included with the program: WordPress and most website-building platforms have plugins or built-in features
- Online Tools: Crawl a URL once to generate a file; suitable for static sites with few pages
- Dynamic Output: For websites with large amounts of content and frequent updates, use a script to generate content based on the database
Once it's generated, specify its location in the robots.txt file:
Sitemap: https://www.example.com/sitemap.xml
Then submit your site once to the Baidu Search Resource Platform and once to Google Search Console. Submission isn't required, but it allows you to view crawl statistics in the dashboard.
II. HTML Version: See the Entire Site at a Glance
An HTML sitemap is more like a master directory that lists top-level and second-level categories as well as main pages; it is typically placed in the footer or on a separate “Sitemap” page. It serves two purposes: visitors can browse through the directory when they can’t find what they’re looking for, and web crawlers can follow the links to crawl several more levels of the site.
Keep two things in mind when doing this: Include only valuable pages; don’t include tab pages, pagination pages, or search results pages. Use the page title as the link text; don’t just write “More” for every link.
III. What It Can and Cannot Solve
A sitemap helps ensure that pages that are “deeply buried and have few entry points” are made accessible to web crawlers. The benefits are most evident for product pages buried deep in the site hierarchy and frequently updated news pages.
There are a few things it can’t do: it can’t guarantee that pages not indexed will be indexed; it can’t increase a page’s ranking; and it can’t replace internal links. Pages with poor quality or duplicate content won’t be indexed even if they’re listed.
It’s worth mentioning a few common mistakes: including pages set to “noindex” in the sitemap; having the robots.txt file itself listed as “Disallow” in the sitemap; and, for multilingual sites, mixing all languages into a single file instead of submitting them separately. Correcting these three issues will typically improve crawl efficiency.
The cost of creating these two maps is very low; once they’re done, they just need to be updated as the content changes. The real hassle is the content itself—the maps simply lay out the existing pages.
For web design in Wuxi, turn to Zongye Technology.

