HTTP: 404 Not Found and soft 404s
Last verified
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://example.com/product/123What it means
404 means the server cannot find anything at that URL. It does not say whether the absence is temporary or permanent; RFC 9110 reserves 410 Gone for resources that are deliberately removed.
Scrapers meet two variants. A real 404 is easy: the status code tells you. A soft 404 is harder: the server returns 200 OK with a page that says "not found" or shows an empty search result, so a script that only checks status codes stores junk. Google's Search documentation uses the same term for these pages. The opposite also happens: some sites return 404 to clients they choose not to serve, so a URL that works in the browser can 404 in a script.
What is not wrong: a 404 is not a network or server failure, and retrying will not help unless the URL itself changes.
What it looks like
r = requests.get(url, timeout=30)
if r.status_code == 404 or "Page not found" in r.text:
mark_missing(url) # covers real and soft 404sWhy it happens
- The URL was built incorrectly (wrong slug, missing trailing slash, wrong locale or ID).
- The item was removed or moved, and the site has no redirect.
- The content is rendered by JavaScript from an API, and the HTML route your script requests does not exist server-side.
- The site returns 200 with an error template (soft 404) instead of a real 404.
- Region or session-specific URLs only exist for the visitor who generated them.
How to fix it
- Open the exact URL from the error in a browser and compare; check for typos, encoding and case.
- Look for a canonical link or sitemap entry to find the current URL of moved items.
- Detect soft 404s by checking for the site's not-found text or for missing key elements, not only the status code.
- Log 404s separately and remove those URLs from future crawls instead of retrying them.
- If the site publishes a sitemap or API, use it to enumerate valid URLs.
How to stop it recurring
Generate URLs from sitemaps, feeds or an API rather than by guessing patterns, and validate scraped records (for example, a product page must have a title and price). Track 404 rates per run; a sudden spike usually means the site changed its URL structure.
Official documentation: developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/404. See all HTTP error messages.
Related errors
Definitions
- CAPTCHACAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a challenge-response m
- Cloudflare Bot ManagementCloudflare Bot Management is the set of Cloudflare features (Bot Fight Mode, Super Bot Fight Mode and the Ente
- DataDomeDataDome is a commercial bot-protection service that scores every request to a website, app or API in real tim
- HUMAN Security (PerimeterX)PerimeterX, now HUMAN Security's Bot Defender after a 2022 merger, is a bot-protection service that scores eve
- User AgentA user agent is a string that browsers send with every HTTP request identifying the browser type, version, and
- AI Web ScraperAn AI web scraper is an AI-powered data extraction tool that understands page structure, identifies relevant d
- Data ScrapingData scraping is the broad practice of programmatically extracting data from any digital source — websites, ap
- Web CrawlerA web crawler (also called a spider or bot) is a program that systematically browses the internet by following
Quick answers
What does "404 Not Found and soft 404s" mean in HTTP?
404 means the server cannot find anything at that URL. It does not say whether the absence is temporary or permanent; RFC 9110 reserves 410 Gone for resources that are deliberately removed. Scrapers meet two variants. A real 404 is easy: the status code tells you.
How do I fix "404 Not Found and soft 404s"?
1. Open the exact URL from the error in a browser and compare; check for typos, encoding and case. 2. Look for a canonical link or sitemap entry to find the current URL of moved items. 3. Detect soft 404s by checking for the site's not-found text or for missing key elements, not only the status code. 4. Log 404s separately and remove those URLs from future crawls instead of retrying them. 5. If the site publishes a sitemap or API, use it to enumerate valid URLs.
Retries and timeouts without writing the loop
Autonoly's HTTP Request node and browser steps have per-node retries, timeouts and continue-on-fail, so a transient 429 or 503 can back off instead of failing the run. It has no proxies or IP rotation: if a site blocks automated traffic, that block applies to Autonoly too.
Also see Error handling in workflows.