204 No Content

What HTTP 204 means, why Google treats 204 responses similarly to soft 404s, when 204 is legitimately used (APIs, beacons), and what to serve instead for web pages.

First published: Jun 27, 2026 · Last updated: Jul 17, 2026 · Advanced
demand #10 in HTTP Errors#19 in HTTP Status Codes#162 in Technical SEO#219 on the site
1 evidence signal on this page

HTTP 204 No Content is a 2xx success code that intentionally returns an empty body — it's not an error, has nothing to do with whether a URL exists, and isn't limited by the spec to any fixed set of methods. It's the correct response for REST API DELETE/PUT calls and analytics beacons (sendBeacon, GA4's Measurement Protocol), though API designers disagree on how often to reach for it. The SEO catch is narrow: Google's own docs say a 204 gives it no content to process, so a page you want ranking won't get indexed from that response — and in practice these commonly show up as soft 404s in Search Console, though Google doesn't guarantee that exact label or a removal timetable. So 204 is right for API and beacon endpoints and wrong for anything meant to rank. If a page is genuinely gone, use 404 or 410; if it moved, use a 301; if it should have content, fix the server/CDN sending 204 instead of a 200 with a real body.

TL;DR — 204 is a spec-compliant 2xx success code (RFC 9110 §15.3.5) that returns an empty body by design — the body must be empty (no Content-Length either, not even 0), and browsers may reject a 204 that ships content. It’s not an error and says nothing about existence, and the RFC doesn’t restrict it to any fixed method list. Legitimate uses are almost all non-document responses: REST API DELETE/PUT, and analytics beacons (sendBeacon(), GA4’s Measurement Protocol) — though practitioners disagree on how often APIs should reach for it. The SEO consequence is narrow: Google’s status-code table says plainly that for a 204, “Google wasn’t able to receive any content and therefore can’t process it” — which means a page you want ranking won’t get indexedStoring a crawled page in the search index so it can appear in results. Crawled is not the same as indexed — Google selects what to keep, and indexing isn't guaranteed. from that response, and in practice these commonly get flagged as soft 404sA soft 404 is a URL that returns a success status code (usually 200 OK) even though the page is empty, missing, or shows a 'not found' message. It isn't a status code a server sends — it's a label search engines apply after comparing the response code against the rendered content, and they treat the page like a 404 for indexing. in Search ConsoleA free Google service that reports how a site performs in Google Search and surfaces problems with how Google crawls, indexes, and serves it. It's first-party data straight from Google — but you don't need it to appear in results., though Google doesn’t guarantee that specific label or a removal timetable. Fix an accidental page-level 204 by restoring a real 200, or by using 404/410/301 as the intent warrants.

What 204 means in the spec

RFC 9110 (HTTP Semantics) is unambiguous: a 204 indicates “the server has successfully fulfilled the request and that there is no additional content to send in the response payload body.” It’s a success code — same 2xx family as 200 OK — with the deliberate difference that there’s no body.

Evidence for this claim RFC 9110 defines 204 No Content as a successful response with no additional content to send and says it is terminated by the header section because it cannot contain content. Scope: HTTP semantics for 204 responses. Confidence: high · Verified: IETF: RFC 9110 §15.3.5 — 204 No Content

Three operational details matter. First, the body genuinely has to be empty: MDN notes a 204 “must not include any content or the Content-Length header (browsers may reject responses that include content).” That’s a real prohibition, not a loose convention — RFC 9110 §8.6 bars Content-Length from a 204 outright, so “just send Content-Length: 0” (a fix I’ve seen recommended) isn’t actually compliant either; the response ends at the header section, full stop. Second, any headers a 204 does carry — an ETag, a Last-Modified — describe the selected representation after your action completed, not a body that got sent. Third, an ETag shows up on some 204s (MDN’s example is a PUT that updates a resource in place) but the RFC doesn’t require every 204 to include one — don’t expect it as a given. A 204 is heuristically cacheable by default unless the method or explicit cache-controlCaching stores a copy of a page or resource — in a browser, a CDN edge node, or a search crawler's own cache — so it can be served again without regenerating or re-downloading it. It isn't a direct ranking factor, but it feeds page speed and crawl efficiency. headers say otherwise.

Crucially, 204 has nothing to do with whether a URL exists. A working API endpoint can correctly return 204 forever. That’s the difference from a 404 (not foundA 302 (\"Found\") is a temporary redirect: it forwards users to a new URL while telling search engines the original URL should stay in the index. It's a weak canonicalization signal, not the zero-equity dead end of SEO folklore.) or a 410 (gone) — those are about absence; 204 is about a successful request that deliberately carries no payload.

How Google treats a 204

Here’s the whole SEO story, and it’s narrower than the vendor-blog boilerplate makes it sound. Google indexes content. A 204 has no content. Google’s own status-code doc singles 204 out with a specific, bounded statement: where the general 2xx rule is that “Google considers the content for processing,” the dedicated 204 row says instead that “Google wasn’t able to receive any content and therefore can’t process it.”

Evidence for this claim Google says it treats a 204 response as though the URL returned a soft 404. Scope: Google Search indexing behavior for URLs returning HTTP 204. Confidence: high · Verified: Google: HTTP status codes and Search

That’s the actual boundary, and it’s worth being precise about what it does and doesn’t promise. The general 2xx guidance elsewhere on that page says empty or error-like content may get reported as a soft 404A soft 404 is a URL that returns a success status code (usually 200 OK) even though the page is empty, missing, or shows a 'not found' message. It isn't a status code a server sends — it's a label search engines apply after comparing the response code against the rendered content, and they treat the page like a 404 for indexing. — but the 204 row itself doesn’t guarantee every 204 lands under that specific Search ConsoleGoogle's free tool for monitoring crawling, indexing, and search performance. label, and Google doesn’t publish a removal timetable for it. What’s solid: a 204 on a content URL supplies Google’s indexingStoring a crawled page in the search index so it can appear in results. Crawled is not the same as indexed — Google selects what to keep, and indexing isn't guaranteed. pipeline with nothing to work with, so saying the URL won’t get indexed from that response is a reasonable inference — not a claim I’d extend into “guaranteed site-wide ranking loss” or “automatic crawl-budget recovery,” because Google’s own documentation doesn’t make either promise. In practice, Search Console commonly does surface these as soft 404s — that’s the pattern I’ve seen and written about — but treat the specific report label and timing as observed behavior, not a documented guarantee.

This is the position I’ve held in my own writing. In my HTTP Status Codes & Their SEO Impact guide on the Ahrefs blog, under how Google handles 2xx responses, I put it directly: “Most 2xxs will allow pages to be indexed. However, 204s will be treated as soft 404s and won’t be indexed.” I stand by that as the practical read; the more precise, current wording from Google’s own doc is the “can’t receive or process content” framing above, which is what I’d point you to for the exact official boundary.

Soft 404s are documented as continuing to get crawled and wasting crawl budgetThe number of URLs an engine will crawl in a timeframe. — but that’s Google’s general soft-404 guidance, not a 204-specific promise. Using 204 doesn’t automatically free up or redirectA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. crawl resources; Google’s own qualification is that resource allocation depends on serving limits, site quality, and inventory, not on which status code triggered the exclusion. The safe takeaway: fix an accidental 204 because it keeps a page from being indexed, not because you’re owed a specific crawl-budget dividend for doing so.

204 vs. the codes it’s confused with

CodeBodyMeansRight use
200 (real content)PopulatedSuccess, here’s the pageA page you want indexed
200 (empty / “not found” copy)Empty or error textSuccess claimed, no real content — a soft 404Nothing; this is a bug to fix
204Empty by designSuccess, intentionally no bodyAPIs, beacons — never a page URL
404AnyNot foundA page that’s gone with no replacement
410AnyGone (permanent)A page deliberately, permanently removed
301Moved permanentlyA page that moved to a new URL

The trap is that 204, empty-200, 404, and 410 can all end up “soft 404” in GSC when there’s no usable content — but they signal very different intents to a spec-compliant client. 410 is the deliberate “this existed and is permanently gone” signal; 204 was never designed for that meaning and shouldn’t sit on page URLs at all.

When 204 is exactly right (not a bug)

Almost every legitimate 204 is a non-document response:

  • REST API DELETE / PUT. When a client deletes a resource or updates one in place and there’s nothing meaningful to return, 204 is the idiomatic answer — it’s RFC 9110’s own recommended pattern.
  • Analytics and tracking beacons. The W3C Beacon spec built around navigator.sendBeacon() expects beacon endpoints to answer with 204. Google Analytics 4’s Measurement Protocol endpoint returns 204 for hits it accepts. Worth flagging: GA4 returns 204 even for malformed or invalid payloads, so a 204 there confirms only that the endpoint was reachable and structurally responded — not that your hit was actually processed. Don’t read a beacon’s 204 as proof of success.
  • “Save without navigating away” UX. A PUT that saves state in place and leaves the user on the current page — MDN’s own framing is that with a 204 “the client doesn’t need to navigate away from its current page.”

The through-line: these aren’t URLs anyone should be indexing, so a 204 is correct and expected. The problem is only a 204 sitting on a document URL that’s supposed to rank.

A related nuance worth flagging: RFC 9110 doesn’t restrict 204 to DELETE/PUT/ beacons specifically — those are just the common patterns. The spec’s definition is method-neutral; what actually matters is the method’s own contract and whether returning a representation would be useful. That cuts both ways. A GET request returning 204 is protocol-legal — practitioners on Stack Overflow have hashed this out for years — the real question for an indexable page isn’t “is 204-on-GET allowed,” it’s “does this URL need to hand Google a representation to be findable,” and for a page you want ranking, the answer is always yes. So the SEO rule isn’t about which HTTP method is in play; it’s about whether the URL is meant to be a document at all.

It’s also worth knowing that “204 is always right for API responses” isn’t universally agreed on even among API designers. Postman’s own writeup lists 204 as the go-to for actions with nothing to return; Brandur Leach has argued the opposite case — that an empty success response can be mildly harmful to API clients that expect a representation back (updated state, a generated ID, a computed field) even after a successful write. That’s a legitimate API-design tradeoff about developer ergonomics, not a matter of HTTP correctness — 204 remains spec-compliant either way — and it’s separate from the SEO question this article is about. One place API writeups sometimes get sloppy: sending Content-Length: 0 on a 204 “to be safe.” Don’t do that — RFC 9110 §8.6 prohibits Content-Length in a 204 response entirely, not just a nonzero one.

Diagnosing and fixing an accidental page-level 204

If a crawlerA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. (Screaming Frog, Ahrefs Site Audit) or your logs show a 204 on a page that should have content:

  1. Confirm what GooglebotGooglebot is Google's web crawler — the software that fetches pages so Google can index and rank them. It comes in two variants, Googlebot Smartphone (primary, under mobile-first indexing) and Googlebot Desktop, and runs an evergreen Chromium renderer. actually gets. Use URL Inspection in Search Console to see the status and rendered content Google receives — not just what your browser sees. A CDN, edge worker, WAF, or app route can return 204 to bots or under specific conditions while looking fine to you (the same “looks fine in my browser” pattern you get with a stray 403).
  2. Then fix by intent:
    • Page should exist with content → find the server/CDN/app logic emitting 204 and restore a proper 200 with the real body.
    • Page is gone with no replacement → return 404 or 410.
    • Page moved301 to the new URL.
  3. Monitor. Watch the GSC Page Indexing reportThe Google Search Console report (formerly Index Coverage) showing how many of your URLs are indexed vs. not indexed, and grouping the not-indexed ones by reason. for soft-404 entries, keep an eye on crawl status codes in your logs, and set your crawlerA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. to flag 204s so an accidental one on a template doesn’t silently deindex a whole section.
TIP Find 204 responses, then classify them by endpoint intent

The checker can identify a 204 and compare user-agent responses, but it cannot know whether the URL is a legitimate bodyless API action or a broken document route.

Run page and endpoint samples through my HTTP Status Checker, then investigate every 204 attached to a URL that users or search engines should navigate to. HTTP Status Checker Free

  1. Separate document URLs from API, beacon, and action endpoints.
  2. Retest suspicious documents with browser and crawler user-agent options.
  3. Restore 200 content, return 404/410, or redirect according to the URL’s actual intent.

The mental model to keep: 204 is not “bad.” It’s a precise tool that’s correct for API and beacon endpoints and wrong for documents. The failure mode is only ever using it in the wrong place. Siblings like 403, 404, 410, and soft 404 each have their own place in that decision — 204’s place is off the page.

Try it live

This is a real endpoint on this site — not a simulation. Hit it from the button, open it in a new tab, or curl -i it from your terminal, and the server answers with the actual status code this article is about.

Open in new tab ↗

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.