2

I have seen some sitemaps that include the home page, eg http://example.com and others that do not.

Is including a home page of any use and recommended in any reputable documentation?

Edit: The offical sitemap site http://www.sitemaps.org/protocol.html shows examples of customization to the homepage, so the real question is if a homepage with default settings is assumed by the search engines and is only required for customization. There are defaults for the optional parameters and some people suggest leaving it to the search engine algorithm if you don't know what you are doing.

This article suggests, "By default, when you submit a sitemap to the search engines your homepage gets a priority level of 1, and all other pages get a priority level of .5", but is the only reference I have found. However, it is ambiguous and does not answer my curiosity.

Gonçalo Peres
  • 143
  • 1
  • 1
  • 6
  • Yes. The home page should exist in your sitemap- every time. What would be the advice not to? It just does not make sense not to include the home page. – closetnoc Jun 28 '15 at 16:42
  • Some people seem to think it is implied that your home page would be included. I've been looking at different static site generators recently and some of their sitemap generators do not seem to include it by default and I was seeing if there was a reason why. Benefits to include it I can think of are have more control over the priority and update time. – RationalDev likes GoFundMonica Jun 28 '15 at 16:48
  • You will see advice that does not make sense often. People often over think things. Keep it simple and do not sweat the small stuff. Having a website is difficult enough. Include the homepage. Do not get into the weeds of craziness over the topic. The mechanics of search is simple. Including the homepage makes sense. Not including it cannot be justified. – closetnoc Jun 28 '15 at 16:52
  • I was hoping to keep it simple by not having to modify any code. ;) – RationalDev likes GoFundMonica Jun 28 '15 at 16:59
  • If it is not included, I would not work hard to include it. I rolled my own sitemap generator and so it was easy. But if it is not so easy, skip it for now. There are more important things to do I am sure! Most of the time the sitemap is not really used anyway. It is only used to ensure that a site can be properly crawled the old fashioned way. If a search engine can crawl your site, then it will prefer that. Where a sitemap becomes important is for extremely large sites and site with pages behind a paywall or login. – closetnoc Jun 28 '15 at 17:04

3 Answers3

2

If you are creating an XML sitemap for your site, it should include all the pages you want search engines to index, including the home page.

Google gives you extra information about the pages in your sitemap in Google Search Console. If you don't include your home page in your sitemap, you won't get the best stats about its index status. See The Sitemap Paradox

Google also uses XML sitemaps as one signal for URL canonicalization. Including the home page in your sitemap makes it more likely that Google will choose its URL as the canonical rather than less desirable variations of http/https, www/no-www, or with index.html. See The Sitemap Paradox There are other methods of URL canonicalization including meta tags and redirects, so sitemaps aren't strictly required for it.

I usually recommend omitting the priority, changfreq and lastmod fields from your sitemap. Google has said that it doesn't typically use those fields because few websites use them appropriately and keep them updated. See When should I update lastmod value in the sitemap?. For most sites just a list of <loc> is usually sufficient for your sitemap, but including images, videos, and hreflang in your sitemap can help video search optimization, image search optimization, and international sites respectively.

Stephen Ostermiller
  • 98,758
  • 18
  • 137
  • 361
  • Google Search Console report my homepage as duplicate? This URL is now excluded. The message by Google is saying: "Duplicate, submitted URL not selected as canonical". – Melroy van den Berg May 01 '22 at 00:25
  • 1
    Duplicate of what? That usually means that Google is indexing a slight variation. Check for http vs https, www vs no-www and slash vs index.html. – Stephen Ostermiller May 01 '22 at 00:49
  • Google search console isn't saying from which url this homepage is a duplicate from. Pretty annoying right? It's the first item from the urlset: https://moneytips.nl/sitemap.xml – Melroy van den Berg May 02 '22 at 01:09
  • 1
    Search Console usually will tell you if you use the inspect URL tool. – Stephen Ostermiller May 02 '22 at 08:35
  • I think I found the root cause. It was still thinking the homepage was a redirect (503). But that was the past. So I manually request for indexing. Google should now hopefully see the url is no longer redirected. – Melroy van den Berg May 08 '22 at 15:04
  • 1
    A 503 is not a redirect. Redirects are all in the 300s. HTTP statuses in the 500s are all errors. Specifically 503 is service temporarily unavailable. It is usually used for maintenance mode for your site. – Stephen Ostermiller May 08 '22 at 15:06
  • Oops my bad. I mean to say 302 I think. I manage all my sites with nginx. So you can redirect pages as well – Melroy van den Berg May 08 '22 at 15:23
  • 1
    That makes more sense. If you had been using a 302 redirect Google would be very unlikely to index your homepage. – Stephen Ostermiller May 08 '22 at 15:32
  • True, but as I said earlier. This is no longer the case. So I manually triggered Google to wake up and reindex my site now. – Melroy van den Berg May 08 '22 at 20:15
2

Yes, but just to add more customization, like how many times does it get changed, and what is the last update time.

Stephen Ostermiller
  • 98,758
  • 18
  • 137
  • 361
0

Yes homepage should be included in sitemap. Website owners inform search engines what pages on their website are available for crawling through sitemap only. so if you will not include your homepage, how search engine will get to know to crawl your homepage.

Bhoomika
  • 9
  • 1
  • 1
    Search engines are capable of finding your pages via the links to and within a website. Some people in the past do not use them at all and claim good results, eg: http://www.smallbusinesssem.com/xml-sitemaps-the-most-overrated-seo-tactic-ever/1193/ – RationalDev likes GoFundMonica Jul 02 '15 at 14:32
  • @RationalDev: the linked article is more than 10 years old. – jor Jan 24 '19 at 12:21
  • Even today search engines engines discover URLs from other sources than sitemaps. Sitemaps can help search engines find all your URLs, but it isn't the only way. In no case do search engines limit their crawling to just what is in your sitemap. – Stephen Ostermiller Apr 14 '22 at 13:26