BYTESLIP ← Back
Knowledge Base // Tutorial 122

Read Search Console’s Page Indexing Report and Fix What Matters

Difficulty: Easy ~30 min Search Console · Python

Search Console’s Page indexing report lists every URL Google knows on your site and the reason any of them isn’t indexed. On a small static site, most of those reasons are normal. This guide sorts them into three groups: expected, fix it and improve and wait. It also gives you a Python script that checks the live status of every URL you export from the report.

Page indexing report triage Five tiles: Page indexing report, sort the reasons, export URLs, run the triage script, validate the fix. PAGE INDEXING SORT REASONS EXPORT URLS TRIAGE SCRIPT VALIDATE FIX
Safety // Read First

Warnings

Important“Not indexed” isn’t automatically bad. Google’s help page says duplicates, redirects, noindex pages and deleted pages shouldn’t be indexed, so don’t force them in. Only click Validate fix after you’ve fixed every URL with that reason. Google stops the validation as soon as it finds one URL that still has the issue.

Checklist // Before You Start

What You Need

How this was tested: The meaning of each reason comes from Google’s Page indexing report help page. We ran index_triage.py with Python 3.13 and 3.12 against a local Apache 2.4.71 test site that had nine planted cases: a good page, a duplicate whose canonical points to another page, a noindex page, a 301, a 410, a “Page not found” page that returned 200, a page without a canonical tag, a missing page and a redirect target. It reported each case correctly. We also ran it on five live URLs from a static site, and it followed a two-hop www + index.html redirect chain to the right final URL.

Walkthrough // Steps 01–07

Open → sort → export → run → fix → validate

You don’t need to read the whole report. Look at the reasons, then work through the URLs that matter.

  1. Step 1: Open the report and read the right parts

    Open the report from Google’s Page indexing report help page, or from your property in Search Console. The parts that matter:

    • Why pages aren’t indexed: one row per reason. Click a row to see example URLs.
    • Source: Website or Google. Google says you can generally fix only the reasons where the source is Website.
    • Sitemap filter above the chart: choose All submitted pages to see only the URLs in your sitemap. Those are the pages you’ve told Google matter.

    Two limits: each example list shows up to 1,000 URLs and isn’t guaranteed to be complete, and you can’t search the report for one URL. For a single URL, use the URL Inspection tool. Google also says that if your site has fewer than 500 pages, a site:example.com search and URL Inspection on your key pages may be all you need.

  2. Step 2: Sort every reason into three groups

    Each reason below uses its name from Google’s help page, with Google’s explanation in short.

    Expected: leave it alone

    • Page with redirect: the URL redirects, so only the target can be indexed.
    • Alternate page with proper canonical tag: this page points to an indexed canonical. Google says there is nothing to do.
    • URL marked ‘noindex’: fine if you meant it.
    • Not found (404): fine if you removed the page and there’s no replacement. If it moved, use a 301.
    • Duplicate without user-selected canonical: Google picked another URL as the canonical. Google calls this working as intended. Act only if it picked the wrong one.

    Fix it

    • Server error (5xx) and Redirect error (redirect loops, chains that are too long, empty or bad redirect URLs).
    • Soft 404: the page looks like an error page but returned 200. See Custom 404 Pages and Soft 404 Fixes.
    • Blocked due to unauthorized request (401) and Blocked due to access forbidden (403): Google says Googlebot never sends credentials. A firewall or bot check may be the cause; see Check What Googlebot Sees.
    • URL blocked by robots.txt, when you do want that page in Search, and the warning Indexed, though blocked by robots.txt. See noindex vs robots.txt.
    • Duplicate, Google chose different canonical than user: your canonical points somewhere Google doesn’t agree with. Google says a canonical must be similar to the page that points to it.

    Improve and wait

    • Crawled - currently not indexed: Google read the page and chose not to index it for now. Google says this is common and doesn’t always mean there’s a problem.
    • Discovered - currently not indexed: Google knows the URL but put off crawling it because it expected the visit to overload the site. That’s why the last-crawl date is empty.
  3. Step 3: Export the example URLs

    Click a reason row to open its details page, then use the export button at the top. Google’s help page says the export includes both the chart data and the table data. Save it to your phone’s Downloads folder. If you get a zip, unzip it in Termux and use the file that lists the URLs:

    cd ~/storage/downloads
    unzip -o "*.zip" -d gsc-export
    ls gsc-export

    The script reads every http or https URL it finds in the file, so the column names don’t matter.

  4. Step 4: Save the triage script

    Save this as index_triage.py in your Termux home folder. For each URL it follows redirects one hop at a time (up to 10). On the final page it reads the status code, any noindex in the robots meta tag or the X-Robots-Tag header, the canonical, the title and a rough word count. It waits one second between URLs so it doesn’t load your server.

    #!/usr/bin/env python3
    """Check the live state of URLs from a Search Console Page indexing export.
    
    Usage: python3 index_triage.py EXPORT.csv [SITEMAP_URL]
    EXPORT can be any CSV or text file: every http(s) URL in it is checked.
    """
    import re, sys, time, urllib.error, urllib.request
    from html.parser import HTMLParser
    from urllib.parse import urljoin
    
    UA = "Mozilla/5.0 (compatible; index-triage/1.0)"
    NOT_FOUND = re.compile(r"page not found|^404\b|^error\b|no longer available|one moment, please", re.I)
    
    class NoRedirect(urllib.request.HTTPRedirectHandler):
        def redirect_request(self, *args):
            return None
    
    OPENER = urllib.request.build_opener(NoRedirect)
    
    def get(url):
        req = urllib.request.Request(url, headers={"User-Agent": UA})
        try:
            r = OPENER.open(req, timeout=20)
        except urllib.error.HTTPError as e:
            r = e
        return r.status, r.headers, r.read(2_000_000).decode("utf-8", "replace")
    
    class Page(HTMLParser):
        def __init__(self):
            super().__init__()
            self.title, self.canonical, self.robots, self.words = "", None, [], 0
            self._in_title = self._skip = False
        def handle_starttag(self, tag, attrs):
            a = dict(attrs)
            if tag == "title":
                self._in_title = True
            elif tag in ("script", "style"):
                self._skip = True
            elif tag == "link" and "canonical" in (a.get("rel") or "").lower().split():
                self.canonical = a.get("href")
            elif tag == "meta" and (a.get("name") or "").lower() in ("robots", "googlebot"):
                self.robots.append((a.get("content") or "").lower())
        def handle_endtag(self, tag):
            if tag == "title":
                self._in_title = False
            elif tag in ("script", "style"):
                self._skip = False
        def handle_data(self, data):
            if self._in_title and not self.title:
                self.title = data.strip()
            elif not self._skip:
                self.words += len(data.split())
    
    def check(url, in_sitemap):
        chain, notes = [], []
        for _ in range(10):
            status, headers, body = get(url)
            if status in (301, 302, 303, 307, 308) and headers.get("Location"):
                chain.append(f"{status}")
                url = urljoin(url, headers["Location"])
                continue
            break
        if chain:
            notes.append(f"redirects ({' > '.join(chain)}) to {url}: link and list that URL instead")
            if len(chain) > 1:
                notes.append("more than one hop: point the first URL straight at the last")
        if status in (404, 410):
            notes.append(f"{status}: fine if the page is gone for good; otherwise restore it or 301 it")
        elif status >= 500 or status == 429:
            notes.append(f"{status}: server problem, check error logs and host limits")
        elif status in (401, 403):
            notes.append(f"{status}: Googlebot never logs in; check for a login wall or firewall rule")
        elif status == 200 and "html" in (headers.get("Content-Type") or ""):
            p = Page()
            p.feed(body)
            rules = ",".join(p.robots + (headers.get_all("X-Robots-Tag") or [])).lower()
            if "noindex" in rules or "none" in [r.strip() for r in rules.split(",")]:
                notes.append("noindex found: remove it if you want this page indexed")
            if not p.canonical:
                notes.append("no canonical tag")
            elif urljoin(url, p.canonical) != url:
                notes.append(f"canonical points to {urljoin(url, p.canonical)}")
            if NOT_FOUND.search(p.title):
                notes.append(f'title "{p.title}" looks like an error or bot-check page')
            if p.words < 150:
                notes.append(f"only {p.words} words of text")
        if in_sitemap is not None and status == 200 and url not in in_sitemap:
            notes.append("not in sitemap")
        codes = " > ".join(chain + [str(status)])
        return codes, notes or ["looks indexable: improve the page and its internal links, then wait"]
    
    def main():
        if len(sys.argv) < 2:
            sys.exit(__doc__)
        text = open(sys.argv[1], encoding="utf-8-sig", errors="replace").read()
        urls = list(dict.fromkeys(re.findall(r"https?://[^\s\",<>]+", text)))
        in_sitemap = None
        if len(sys.argv) > 2:
            in_sitemap = set(re.findall(r"<loc>\s*([^<\s]+)\s*</loc>", get(sys.argv[2])[2]))
        for i, url in enumerate(urls):
            if i:
                time.sleep(1)
            codes, notes = check(url, in_sitemap)
            print(f"\n{codes}  {url}")
            for n in notes:
                print(f"     - {n}")
    
    if __name__ == "__main__":
        main()
  5. Step 5: Run it on the export

    python3 ~/index_triage.py gsc-export/Table.csv https://example.com/sitemap.xml

    Use the name of the file you exported. Output from our test server (its address is replaced with example.com here):

    200  https://example.com/tutorials/dup-guide/
         - canonical points to https://example.com/tutorials/good-guide/
         - not in sitemap
    
    200  https://example.com/tutorials/quiet-guide/
         - noindex found: remove it if you want this page indexed
    
    301 > 200  https://example.com/tutorials/old-name/
         - redirects (301) to https://example.com/tutorials/new-name/: link and list that URL instead
    
    200  https://example.com/tutorials/thin-page/
         - no canonical tag
         - title "Page not found" looks like an error or bot-check page
         - only 8 words of text
         - not in sitemap

    The first column is the chain of status codes. 301 > 200 means one redirect, then the page.

  6. Step 6: Fix by what the script found

    • redirects … link and list that URL instead: update your internal links and sitemap to the final URL. One hop is fine; chains are covered in Clean URLs.
    • 404 / 410: decide if the page is really gone. If it moved, add a 301.
    • noindex found: remove it if you want the page in Search.
    • canonical points to … or no canonical tag: give every page a self-referencing canonical. See Title, Meta Description, Canonical and OG Tags.
    • looks like an error or bot-check page: open the URL from another network and compare. A 200 page that says “not found” is a soft 404.
    • only N words of text and looks indexable: for Crawled or Discovered pages, make the page more useful and link to it from related pages. See Find Orphan Pages and Weak Internal Links.
    • not in sitemap: add the page if it should be indexed, or ignore it if it’s a duplicate.
  7. Step 7: Validate the fix, then check one URL live

    When every URL in a reason is fixed, open that reason and click Validate fix once. Google says validation typically takes up to about two weeks. If it fails, See details shows the URL that failed. For your most important pages, open URL Inspection, run Test live URL, and click Request indexing if the page is indexable. Google sets a daily limit for each property, so for many new or updated pages, submit a sitemap with <lastmod> instead. New pages can also go to Bing and other engines through IndexNow: see Get New Pages Crawled.

Pro Tip

Filter to submitted pages first

Questions // FAQ

FAQ

Why does a page I deleted still show up as 404?

Google keeps crawling URLs it knows for a while after they return 4xx, in case the error is temporary. The report only lists URLs that returned 404 in the past month, so old ones age out.

Can I look up one URL in this report?

No. Google says you can’t search or filter the Page indexing report by URL. Use the URL Inspection tool for one URL.

The live test is fine but the report still shows an error. Why?

You may have fixed the page after Google last crawled it. Check the crawl date. Also, the live test doesn’t check duplicate or canonical problems at all.

Should I aim for 100% indexed?

No. Google says not to expect every URL to be indexed, only the canonical version of each important page.

Keep Reading
Sources // Verified

Official docs

Reason meanings, Source column, sitemap filter, 1,000-URL limit, export, validation and the under-500-pages advice: Page indexing report. Live test, Request indexing, daily limit and what the live test skips: URL Inspection tool. Canonical rules: How to specify a canonical URL. Status codes: How HTTP status codes affect Google’s crawlers. Script modules: urllib.request and html.parser.

← All Tutorials Byteslip Apps