Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tend to generate the sitemaps for my static sites (no CMS) by using a service such as xml-sitemaps.com. They way this works if you input your homepage and it crawls all the internal links of a site and then generates you a .xml file.

The problem with this is because its crawling from the homepage if a page if not linked to i.e. a 404 page it won't be included in the sitemap.

Is it good practice to have the 404 page in there?

share|improve this question
Sounds like there is a bug in that site! – DisgruntledGoat Jun 14 '13 at 17:08
up vote 4 down vote accepted

Sitemap.xml helps your website to be well and fast indexed. By submitting this file to search engines, I don't see any good reason to ask them to index a page that doesn't exist (404 HTTP status).

share|improve this answer
Why wouldnt 404 exist ? It is a page /404.hmtl (although there is no reason to go there apart from in the incident of an error) – sam Jun 14 '13 at 14:00
Ok for a custom 404 webpage but not for URL that gets a webpage which doesn't exist. – Zistoloen Jun 14 '13 at 14:05
@sam: You seem to have answered your own question by your comment, "there is no reason to go there". So why index it as a possible soft-404? A custom error document probably should not be accessible directly over HTTP anyway, since by itself it probably does not contain anything useful. – w3dk Jun 14 '13 at 14:17
@sam if a page is not found you should not be redirecting to the 404 page, the server should just show the contents of 404.html but keep the URL as example.com/missingpage.html – DisgruntledGoat Jun 14 '13 at 17:09
@DisgruntledGoat should i set header as 404 or 200 and show them 404 content ? – AMB Aug 2 '15 at 5:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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