6

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?

8

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.

  • But you can reference sitemaps inside a sitemaps to mimic hierarchies? – cs0815 Jul 17 '16 at 21:32
  • @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 Jul 17 '16 at 21:57
  • I guess having a parent sitemap World.xml and Continentxxx.xml child sitemaps etc. would not make much sense to represent the meaning of the hierarchies described in the original question? – cs0815 Jul 18 '16 at 8:03
  • 1
    @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. – MrWhite Jul 18 '16 at 8:32
3

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.

-1

Sitemap index file can list multiple sitemaps see sitemaps.org.

  • 2
    Does this indicate a hierarchy though? – paulmorriss Sep 7 '12 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.