missing attachment are showing as 404

Although I see this question not specific to WordPress (at least the answer it’s not), I see similar questions posted in a regular basis and I think it is good to give a answer.

If a URL doesn’t exist, in your case the URL is for a non-existant attachment, 404 is the correct HTTP status code. Nothing to worry about. The problem would exist if a correct URL triggers a 404 error. Same for any other URL pointing to your site. If the URL points to a non-existant resource, it must trigger a 404 status code.

When to fix 404 errors:

  • If a URL is correct and it generates a 404 error, it should be immediatly corrected. It is a valid resource but you are saying to everyone that it doesn’t exist and search engines won’t index it.
  • If the URL is incorrect but it is very similar to a correct one, you can consider to make a 301 redirection to the correct location. These nearly correct URLs are usually from human mistyped text and, while optional, it is recommended in order to not lose legitimate traffic, specially if the nearly correct URL has a high traffic potential. For example, if you have a URL like mysite.com/health and someone linked to you using mysite.com/healt.

When to ignore 404 errors:

  • If the 404 error is generated by a URL pointing to a non-existant resource that has not been moved to any other location and it is not recognized as possible mistyped URL, just ignored them, it is the correct status code. Build a good 404 error page to keep the user in your web even if he/she gets a 404 error.

How much time you will see that errors in Google Search Console?

If yo see a URL generating 404 error in Google Search Console and mark it as fixed, it will appear again if Google crawls the URL again. That is totally normal and it will happen until Google deindexes that URL. How much that time is depends on several factors that only someone from inside Google can know exactly (if there is someone who knows exactly that).

Even deindexed URLs can appear again in the crawl errors report in the future if Google found that URL again and decides to follow it again. Even if there is not a single link on Internet pointing to that URL, Google can try to crawl again URLs it has in its index/history, but as I said before, nothing to be worried about. Just be sure the incorrect URLs are not linked within your site to not break the user experience; try to search your entire database for the URL and the files of your theme for possible old broken links and that’s all.

For more inforamtion you can read the Google Support Center about 404 errors.