Sitemap: Hierarchical layout possible?
Solution 1
It is not possible to define any hierarchal structure in your XML sitemap. The XML sitemap is a straight forward list of all your pages. Any hierarchal structure to your pages will be determined by Google when it crawls your site.
The hierarchal structure is more relevant to your users. So, your HTML sitemap (if you have one) could be defined in this way. Perhaps using a series of nested lists.
Solution 2
Sitemap is essentially an unordered set of URLs, each of them with information about priority, last change, and expected frequency of change. We could imagine the priorities as a kind of linear ordering of the URLs, but that would be the only "layout" possible.
If the site contains too many URLs, it can be split into multiple Sitemaps, linked from one Sitemap Index. It may seem like a hierarchy, but it is not -- it is just a way to split one long file into multiple files, so that google does not have to download too much data together; but in the end, the data are joined into one big set.
If you want to somehow support your hierarchical structure by Sitemap, you could assign various nodes priorities depending on their depth in hierarchy. For example the "World" could have priority 1.0; each "Continent" 0.9; each "Country" 0.8; each "State" 0.7; each "City" 0.6; and you could still use numbers from 0.5 to 0.1 to prioritize different "Articles".
The benefit of doing so is that when people search for some keywords, they will find the most general page relevant to this keyword. For example if you provide the same text in the description of Europe, France, and Paris, the google results will put Europe first. Which may or may not be what you want.
Related videos on Youtube
Comments
-
Quintin Par over 1 year
Is it possible to design my sitemap hierarchically?
My site is laid out hierarchically into
World=>Continent=>Country=>State=>City=>Articles
Can I design my sitemap xml like this? Is there a benefit?
-
YardenST almost 12 yearsIf you want to indicate hierarchical layout, use Breadcrumbs Rich Snippets support.google.com/webmasters/bin/…
-
-
paulmorriss over 11 yearsDoes this indicate a hierarchy though?
-
nomoa almost 8 yearsBut you can reference sitemaps inside a sitemaps to mimic hierarchies?
-
MrWhite almost 8 years@csetzkorn You can reference other XML sitemaps inside a sitemap index (not an ordinary XML sitemap) - but this is a special case, generally for when dealing with very large datasets and has nothing to do with representing a hierarchal structure.
-
MrWhite almost 8 years@csetzkorn Arranging the sitemaps in such a way might be logical to help manage the sitemaps, but it doesn't represent any hierarchal structure in terms of SEO (Google) - which I believe is what the OP is asking. Having separate sitemaps for the "Continents" could be beneficial in terms of reporting (GWT / Google Search Console) as you could then determine how many URLs from each sitemap are indexed - but again, this does not convey a "hierarchal structure" to the search engines.