Sub topic 7
Redirects, 404s, soft 404s and server errors
This chapter assumes you have a verified Search Console property and can read an HTTP status line such as HTTP/1.1 301 Moved Permanently. It also assumes you know what the Not indexed table and its example URLs look like. The previous chapters covered the report layout. Here you learn to read the reasons that come from the server's response, and to decide which ones need action.
What these reasons have in common
Googlebot requests a URL and gets a response. The status code and the content of that response decide what happens next. If the response is not a normal, indexable page, the URL goes into the Not indexed table with a reason that names the cause.
The reasons in this chapter are:
| Reason in the report | What Google saw | Usually expected? |
|---|---|---|
| Page with redirect | The URL answers with a 3xx and points elsewhere | Yes, for old URLs |
| Redirect error | A redirect chain that Google could not follow | No |
| Not found (404) | The URL answers 404 or 410 | Often, for removed pages |
| Soft 404 | The URL answers 200 but looks like an error or an empty page | No |
| Server error (5xx) | The server failed or timed out | No |
| Blocked due to access forbidden (403) or unauthorized request (401) | The server demanded credentials or refused the request | Depends on the page |
Some of these reasons also appear with a "Submitted URL" prefix, for example "Submitted URL not found (404)". The prefix means the URL is listed in a sitemap you submitted. A submitted URL that fails is a stronger signal of a problem. You told Google the page should be indexed, and the server contradicted you.
Page with redirect
The URL answered with a redirect, so Google follows it and treats the destination as the page to consider. The source URL is not indexed, which is normal.
The report lists the source URL, not the destination. A URL like http://example.com/old appears here because it redirects. Whether the destination is indexed is a separate question, which you check by looking for that URL elsewhere in the report.
The reason is expected in these cases:
- You migrated URLs, changed a slug, or moved from HTTP to HTTPS.
- The
wwwand non-wwwhosts redirect to one preferred host. - A trailing-slash rule redirects
/shoesto/shoes/.
It points to a problem when your own sitemap or internal links still use the redirecting URL. Each such link costs a request and sends mixed signals about which URL you prefer. Fix the links and the sitemap so they point at the final destination.
Permanent and temporary redirects
| Status | Meaning | Signal to Google |
|---|---|---|
| 301, 308 | Moved permanently | Strong hint that the destination is the canonical URL |
| 302, 303, 307 | Moved temporarily | Weaker hint, the source may stay as the canonical |
Google follows both kinds. Use a permanent redirect when the move is permanent. A temporary redirect left in place for months can keep the old URL in the index.
server {
listen 80;
server_name example.com www.example.com;
return 301 https://www.example.com$request_uri;
}Redirect error
Redirect error means Google started following a redirect and could not finish. Typical causes are:
- A redirect loop, where A sends to B and B sends back to A.
- A chain that is too long. Googlebot follows a limited number of hops, and the documented limit is 10.
- A redirect to an empty or malformed URL.
- A redirect to a URL that exceeds the maximum URL length.
Trace the chain from the first URL to the end. You can do this with curl:
curl -sIL --max-redirs 10 -o /dev/null -w "%{http_code} %{url_effective}\n" https://example.com/oldA short script lets you see every hop. It uses only the standard library and does not follow redirects automatically, so each hop is visible:
import http.client
import sys
from urllib.parse import urljoin, urlsplit
REDIRECT_CODES = (301, 302, 303, 307, 308)
def trace(url, max_hops=10):
hops = []
for _ in range(max_hops + 1):
parts = urlsplit(url)
conn_cls = (
http.client.HTTPSConnection
if parts.scheme == "https"
else http.client.HTTPConnection
)
conn = conn_cls(parts.netloc, timeout=10)
path = parts.path or "/"
if parts.query:
path += "?" + parts.query
conn.request("HEAD", path, headers={"User-Agent": "status-check/1.0"})
resp = conn.getresponse()
status = resp.status
location = resp.getheader("Location")
conn.close()
hops.append((status, url))
if status in REDIRECT_CODES and location:
url = urljoin(url, location)
else:
return hops
hops.append(("too many redirects", url))
return hops
if __name__ == "__main__":
for status, hop_url in trace(sys.argv[1]):
print(status, hop_url)Run it as python trace.py https://example.com/old. A healthy result ends with one 200 line after one or two redirect lines. Fix a loop or a long chain by pointing the first URL directly at the final destination.
Not found (404)
Google requested the URL and received a 404 (Not Found) or 410 (Gone). Google treats the two almost the same. A 410 may drop the URL from the index slightly faster.
A 404 is expected when you deleted a page on purpose and nothing important links to it. Google does not penalize a site for having 404 URLs. A real 404 is the correct answer for a page that does not exist.
Investigate when any of these hold:
- The URL is in your sitemap. This shows as "Submitted URL not found (404)".
- The page should exist. A deploy, a CMS change, or a routing bug may have removed it.
- Internal links point to it. Use the "Referring page" information in URL Inspection to find them.
- External sites link to a deleted page that has a close replacement. Redirect it to that replacement.
If a page is gone and has no replacement, leave it as a 404 or 410. Redirecting every dead URL to the home page is a poor practice, and it often produces the next reason.
Soft 404
A soft 404 is a page that tells the user "not found" or shows almost nothing, while the server returns 200 OK. Google detects this from the content and reports the URL as Soft 404. It is not indexed.
Common sources:
- An error template that was served with status 200.
- An internal search page with zero results.
- A product page for an out-of-stock item with no description.
- A category with no items.
- Mass redirects of removed pages to an unrelated page, such as the home page.
Which fix applies depends on what the page should be:
- If the page should not exist, return a real 404 or 410.
- If the page moved, return a 301 to the closest equivalent page.
- If the page should exist, add real content so it stands on its own.
Here is the typical broken response and its fix.
HTTP/1.1 200 OK
Content-Type: text/html
<h1>Sorry, we couldn't find that page.</h1>HTTP/1.1 404 Not Found
Content-Type: text/html
<h1>Sorry, we couldn't find that page.</h1>Server error (5xx)
Google received a 500-range response, or the connection failed or timed out. This reason is rarely intentional. Treat it as a problem until proven otherwise.
Three behaviors matter:
- Google retries 5xx URLs. A brief outage can heal itself, and the URL leaves the table after a successful crawl.
- If many requests fail, Googlebot lowers its crawl rate for the site. A 5xx spike can slow the discovery of all your pages, not just the failing ones.
- A URL that keeps returning 5xx can eventually be dropped from the index.
Check your server logs for the timestamps in the report and match them to deploys, traffic peaks, or database errors. If the error is temporary on purpose, such as planned maintenance, return 503 with a Retry-After header, and keep the window short.
HTTP/1.1 503 Service Unavailable
Retry-After: 3600401 and 403 reasons
"Blocked due to unauthorized request (401)" and "Blocked due to access forbidden (403)" mean the server asked for credentials or refused Googlebot. This is correct for login-only areas, admin pages, and account pages. It is a problem when a public page returns 403, often because a firewall, CDN rule, or bot filter rejects Googlebot. Confirm the request really came from Google before you allow it, because many scrapers fake the Googlebot user agent. Google documents a reverse DNS check for this.
A decision path
Confirming before you fix
The report can lag behind your site. Before acting on a URL, open it in URL Inspection and compare the report's claim with a live test. Check that the live response status matches what you expect. If you already fixed the problem, the live test passes while the indexed version still shows the old state. Then you start validation, which is covered later in this tutorial.
Exercise
A URL in your sitemap appears under "Soft 404". A request with curl returns HTTP/1.1 200 OK, and the page body says "No products found". The category is intentionally empty for now. What are two valid fixes, and which one would you choose if the category will be refilled next month?
Show answer
Valid fixes are to return a real 404 (or 410) for the empty category, or to put useful content on the page so it is not an empty shell. Because the category will be refilled, keep the URL and avoid a permanent removal. A reasonable approach is to remove the URL from the sitemap while it is empty, or to add content such as related categories and a description. Do not redirect it to the home page, since that is itself a common soft 404 pattern.
Exercise
The report lists http://example.com/about under "Page with redirect", and your sitemap still contains that HTTP URL. Is this a problem, and what do you change?
Show answer
Yes, it is a mild problem. The redirect itself is fine, since HTTP to HTTPS is a correct permanent redirect. The sitemap, however, should list the final URL. Replace the entry with https://www.example.com/about (or whatever the final destination is), and update internal links that still use the HTTP form.
Exercise
Your report shows 800 URLs under "Server error (5xx)", all within a single hour two days ago, and a live test of a sample now returns 200. What do you do?
Show answer
Match the hour to your server logs and deploy history to find the cause, such as a failed release or an overloaded database. Because the live test now passes, the fix is already in place, so start validation in the report and watch for the count to fall. Add monitoring or a maintenance response (503 with Retry-After) so future outages are handled cleanly.