TapCub is live — analytics, insights and live chat, free on one platform
Analytics

How to Check URL Status Codes and Fix the Pages That Matter

How to check URL status codes in bulk with curl, what each code means for Google, and how to rank the problem URLs by traffic so you fix the right ones first.

Lin Zhou Published Nov 23, 2026 11 min read Analytics
Sample data: a checker run over 1,200 URLs from a sitemap and old internal links. 180 are not a clean 200; traffic data decides which of them to fix first.Sample data

To check URL status codes, request each address and record the three-digit HTTP code and where redirects end; curl does it in one line and a loop covers a whole list. The real work is deciding which failures matter: a 500 on a visited page first, then 404s ranked by visits, then wrong redirects. Below: a code table with Google's treatment, a worked 1,200-URL run and the traffic-ranked fix order.

What you will learn

  • Use GET with redirects followed and a hop limit; re-run every non-200 once before acting
  • Fix 5xx on visited pages first, then 404s by visits: in the sample one URL held 86% of 404 visits
  • Use 301 for permanent moves, 404 or 410 for removed pages, and never a 200 that shows an error

How do you check URL status codes?

A URL status checker requests each address and records the three-digit HTTP status code the server answers with, plus where a redirect ends up. For one page, your browser's developer tools (Network tab) or a single command is enough. For a site, you run the same request over a list of URLs and sort the results by status.

The one-line command, using curl:

curl -s -o /dev/null -L --max-redirs 10 \
  -w "%{http_code} %{num_redirects} %{url_effective}\n" \
  https://example.com/old-page

-L follows redirects, --max-redirs 10 stops loops, and the output reads status hops final-url. For many URLs, put them in a file and loop:

while read -r u; do
  printf "%s " "$u"
  curl -s -o /dev/null -L --max-redirs 10 \
    -w "%{http_code} %{num_redirects} %{url_effective}\n" "$u"
done < urls.txt > results.txt

Two cautions before you trust the output: some servers answer a HEAD request differently from a GET (use GET, as above, for anything you will act on), and a checker only sees what the server says at that moment, from your network. It cannot tell you which of the bad URLs anyone actually visits. That second step, ranking by traffic, is where most guides stop and where this guide spends most of its time. The cleanup itself is in fix 404 errors; what search-engine crawlers report is in crawl errors.

What does each status code mean, and what should you do?

Status codes are grouped by their first digit: 2xx success, 3xx redirection, 4xx client error, 5xx server error. The definitions are in RFC 9110; how Google treats them is documented on its HTTP status code page.

CodeMeaningHow Google treats itWhat to do
200OK, content returnedConsidered for indexing; not a guaranteeNothing, unless the content is an error message (soft 404)
301 / 308Moved permanentlyStrong signal the target should be processedRight choice for a permanent move
302 / 303 / 307Temporary redirectWeak signal for the targetChange to 301 if the move is permanent
304Not modifiedContent unchanged since last crawlNormal; fine
401 / 403Needs login / forbiddenTreated as a 4xx: content ignoredFine for private pages; wrong for public ones
404Not foundContent treated as nonexistent; indexed URL is removed over timeRedirect to the closest page if one exists, otherwise leave as 404
410GoneSame group as 404Use when you removed it on purpose and it will not return
429Too many requestsTreated as a server-overload signalSlow your checker; check rate limits
500 / 502 / 503 / 504Server error / gateway problemCrawling slows; URLs that keep failing are removed from the indexFix first; these affect real visitors

Two details worth knowing from the sources. First, RFC 9110 says 404 makes no claim about permanence while 410 says the removal is intentional, and that 410 is preferred when the server knows the condition is permanent. Second, Google follows up to 10 redirect hops, and treats 307 like 302 and 308 like 301. Google's page gives no number of days for how fast a URL leaves the index after a 404 or 410, so do not promise one.

CodeMeaningWhat to do
200OKNothing, unless the content is an error message
301 / 308Moved permanentlyRight choice for a permanent move
302 / 307Temporary redirectChange to 301 if the move is permanent
404Not foundRedirect to the closest page or leave as 404
410GoneIntentional, permanent removal
429Too many requestsSlow your checker
5xxServer errorFix first: real visitors are affected

Google treats 301 and 308 as strong signals and 302, 303 and 307 as weak ones.

Worked example: 1,200 URLs through a checker

Sample data: a site exports 1,200 URLs from its sitemap and old internal links and runs the loop above. The results:

ResultURLsShare
2001,02085.0%
301 or 302968.0%
404544.5%
5xx181.5%
403121.0%
Total1,200100.0%

That is 180 URLs that are not a clean 200. Fixing them in alphabetical order, as the output arrives, is the usual mistake. Joining the list to traffic changes the order completely.

app.tapcub.com

1,200 URLs by status

URLs
2001,020
301 / 30296
40454
5xx18
40312
Sample data
Sample data: a checker run over 1,200 URLs from a sitemap and old internal links. 180 are not a clean 200; traffic data decides which of them to fix first.

Which bad URLs matter? Rank them by traffic

Export the same period's pageviews per URL from your analytics (last 30 days is a good default) and join it onto the checker output. Sample data for the worst offenders:

URLStatusVisits, 30 daysAction
/signup500640Fix now: real visitors are hitting a server error
/pricing-20234041,840301 to /pricing
/docs/start302 to /docs/getting-started3,100Change to 301
/old-a to /old-b to /old-c to /guide3 redirect hops450Point /old-a straight at /guide
/blog/old-guide404210301 to the closest current guide
/thanks-old200 with "page not found" text12Return a real 404 or 410
/tag/misc4044Leave it, or 410

Rules that produced this order:

  1. 5xx on a URL with traffic comes first, because it is a failure for current visitors, not just for search.
  2. Then 404s, by visits. All 54 of the 404 URLs together received 2,140 visits in the 30 days: the three in the table (1,840 + 210 + 4 = 2,054) plus 86 spread across the other 51. /pricing-2023 alone is 1,840 ÷ 2,140 = 86.0%. One redirect fixes most of the damage.
  3. Then permanent redirects that are temporary. A 302 on a heavily visited URL is cheap to fix and affects how the target is treated.
  4. Then redirect chains, which add latency and risk the 10-hop limit.
  5. Then soft 404s, pages that return 200 but show an error. Google reports these in Search Console when the page looks empty or like an error; the fix is a real 404 or 410, or a 301 if the content moved. See the soft 404 definition.

Notice what the traffic join also tells you: of 54 404s, most can be ignored. A checker finds problems; traffic tells you which problems are worth an afternoon.

Where do you get the list of URLs to check?

A checker is only as good as its list. Four sources, in the order they usually pay off:

  1. Your sitemap. It lists what you want indexed; every URL that is not a 200 there is a direct contradiction and should be fixed first.
  2. Top landing pages from analytics. The pages people actually enter on are the ones where an error costs the most.
  3. Old URLs you changed. After a migration, keep the old list and check that each one redirects once to the right new address.
  4. Pages that other sites link to. If external links point to a URL that now returns 404, you lose the visitors and the link's value.

No command line? Your browser's developer tools show the status of one page at a time (Network tab, reload, read the first row), and a spreadsheet of results from any bulk checker can be sorted and joined to traffic in the same way as below.

Why does the checker disagree with a browser or with search results?

Five common reasons:

  • Different user agent. Some servers or firewalls answer a command-line client differently from a browser or a search crawler. Set a browser-like user agent if the results look wrong.
  • Rate limiting. A 429 or a burst of 403s halfway through a big list usually means the checker is being throttled, not that the pages broke.
  • Redirect by script. A page that returns 200 and then redirects in the browser with JavaScript looks fine to a checker.
  • Location. A CDN or geo rule can answer differently from different places.
  • Time. A 503 during a deploy is not a permanent state; re-check failures before acting.

Re-run every non-200 URL once, a few minutes later, before putting it on the fix list.

How often should you check?

After any change to URLs (a migration, a redesign, a CMS change), check immediately. Otherwise, a monthly check of the sitemap and your top 500 landing pages is usually enough; automated alerts are better than any schedule for the 5xx case. The cost is small: assuming an average of 0.3 seconds a request, 1,200 URLs take about 1,200 × 0.3 = 360 seconds, six minutes; a sleep between requests keeps it polite.

How to use traffic data in TapCub

TapCub does not crawl your site or check URLs for you; it reports the status codes that visitors and crawlers actually met. That is the traffic half of the job above:

  1. Visitor 404s. In Web analytics › Pages, the 404 tab lists missing pages that visitors opened, with the hit count and the previous page that sent them. Sort by hits and start with the top row; the previous page tells you which internal or external link to fix.
  2. Crawler errors. In Monitoring › Crawl health, see the search-engine and AI-crawler fetches with 404s and 5xx counted separately, a success rate where success means a status below 400, and the 404 list. Paths that appear in both the visitor 404 list and the crawler list should be fixed first.
  3. Bot status codes. In Web analytics › Bots, the All bots table shows each crawler's most common status code.
  4. Confirm the fix. After you add a redirect, pick a date range that starts after the change; hits for that path in the 404 tab should stop.

Crawl health only covers search engines and AI crawlers, not SEO tool crawlers, and crawler 404s and visitor 404s are separate lists, so they can disagree.

FAQ

How do I check the status code of a URL?

Open your browser's developer tools, go to the Network tab and reload the page; the status appears next to the first request. From a terminal, curl -s -o /dev/null -w "%{http_code}" URL prints the code. For many URLs, loop over a file as shown above.

What does a 301 versus a 302 redirect mean?

A 301 says the page has moved permanently, which Google treats as a strong signal that the new address should be processed. A 302 says the move is temporary, which is a weak signal. Use 301 for permanent moves.

Should I use 404 or 410 for a removed page?

Both are treated the same way by Google, as content that does not exist. RFC 9110 says 410 signals an intentional, permanent removal and is preferred when the server knows that; use 404 when you are not sure.

Why does a page return 200 but Google calls it a soft 404?

Because the page shows an error message or is nearly empty while the server says success. Return a real 404 or 410 for pages that are gone, or redirect with a 301 if the content moved.

How many redirects in a row are too many?

Googlebot follows up to 10 hops, but each hop adds latency and a chance of failure. Aim for one: point every old URL straight at its final destination.

Sources

Filed underAnalytics

Was this article helpful?

We use your answers to fix and expand this page.

Lin Zhou

Product Experience Specialist

Writes about product experience, practical workflows, and growth, turning complex processes into clear steps for everyday decisions.

See which broken pages people actually hit

The 404 tab shows missing pages visitors opened and the page that sent them; crawl health shows crawler 404s and 5xx.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics