734 pages and Google only had half — how I stopped chasing indexing by hand and built a dashboard that watches Google for me (with a Google Cloud wall along the way)

For a while I stopped checking whether Google picked up what I published, because it did so on its own; on 26 November I looked again and, out of 734 pages, Google had half.

There was no hidden error that explained everything. There were URLs Google knew about and hadn’t gone to read, others it had read and didn’t want yet, and a few old ones that had been returning a 404 for months without me noticing. This article tells what I found that day, how we fixed it and the dashboard we built so it no longer depends on me remembering.

“Behind SergioLearns” series. If you’re new here, start with The SergioLearns story; how each article gets written is in How I make the articles and the November redesign is in How I rebuilt SergioLearns in six days. This one is about indexing; the next one, about everything else the site now does by itself.

In short: a sweep, 24 redirects and a dashboard

On the morning of 26 November I did a full sweep of the site’s indexing with Claude. Result: 734 URLs in the sitemap, 370 indexed and 364 not indexed, none of them with a technical block. Along the way, 24 old URLs turned up that returned a 404 and now redirect to the right place. And by midday a dashboard built with Google Apps Script was running: every morning it asks Google about each URL and tells me which ones are missing.

What used to be an hour a day in Search Console is now opening the dashboard and requesting about ten. The rest happens on its own.

Why I took this on

I’ve always had trouble with indexing. When article output went up with the new workflow, I often forgot to check whether scheduled articles were actually scheduled, and many others had gone months without being indexed because of unsolved problems.

That’s when I understood that, if I wanted AdSense to see I had everything under control, I had to get my act together and find a way for this not to become a long, heavy chore.

To give you an idea of the volume: on 26 November there were 306 posts scheduled up to 29 December. At that pace, checking each one by hand on the day it goes live is no longer a task. It’s a second job.

What “indexing” means (and why requesting it isn’t enough)

When I publish an article, WordPress serves it and Rank Math adds it to the sitemap, the list of URLs the site offers Google. That’s as far as my control goes. From then on, Google decides everything: first it has to discover the URL, then crawl it (go and read it) and finally decide whether to index it, that is, whether to store it so it can show it in search results.

The road of a URL from published to indexedFive steps: published, in the sitemap, discovered, crawled and indexed. Requesting indexing only brings Google's visit forward. On 26 November, of 734 URLs, 370 were indexed, 89 discovered but not indexed, 72 crawled but not indexed and 203 had no data.Publishedreturns 200In the sitemapRank Math adds itDiscoveredGoogle knows itCrawledGoogle read itIndexedcan now show upThe road from a URL to GoogleI control the first two steps; Google decides the last three"Request indexing": brings the visit forward89Discovered,not indexed72Crawled,not indexed203no data yet (new or undiscovered)370indexedThe 734 sitemap URLs on the morning of 26 Nov (sweep using the Search Console report from 16 Nov)
Look at where they get stuck: none because of a technical error, all of them waiting for Google to come by or make up its mind.

Look at the two bottlenecks in the drawing. A URL that is “Discovered, not indexed” is one Google knows exists but hasn’t read yet. One that is “Crawled, not indexed” is worse: Google has read it and, for now, decided not to keep it.

The “Request indexing” button in Search Console only acts on the first stretch: it brings Google’s visit forward. It doesn’t force anything to be indexed. And Google only lets you request a few a day, so you can’t use it like a hose. That’s why requesting indexing isn’t enough: it gets Google to come sooner, but if the page doesn’t convince it, or nothing links to it, Google can read it and leave it out anyway.

If a URL is “Crawled, not indexed”, requesting it again helps little. It helps more to link to it from pages that are already indexed and to improve its content.

How I used to do it

At first, since I published only a few articles a day, I did it myself: I opened Search Console, inspected the URL and requested indexing. Then I stopped, because Google started indexing them on its own, without me asking, almost the same day they went live.

When I did do it, I spent an hour a day checking, requesting, retrying and fixing problems. An hour that wasn’t for studying or writing: it was for looking at statuses on a screen.

The problem came when both things happened at once. I no longer checked because Google was doing it alone, and at the same time I started publishing much more. The URLs Google didn’t pick up on its own just sat there, for weeks and months, without anyone noticing.

The sweep on 26 November

The first step was knowing where we really stood. The Search Console pages report had data from 16 November: 395 pages indexed and 486 not indexed.

486 sounds scary, but almost all of them are left out on purpose:

Why it isn’t indexedHow manyIs that fine?
Redirects42Yes: the old URL sends you to the new one
Alternates with a canonical (the listing pages’ ?query-12-page=)82Yes: Google indexes the main version
Blocked by robots.txt (the /feed/ and /wp-admin/ URLs)77Yes: they shouldn’t show up on Google
Noindex (tags and searches)37Yes: excluded on purpose
Not found (404)28Half of them are bits of code Google reads as if they were links

So the right question wasn’t “why are 486 not indexed?” but “how many of the ones I want on Google are missing?”. Those are the sitemap URLs: 734. Of them, 370 were indexed and 364 were not.

The 364 were checked one by one, logged out, the way Google would see them: all returned 200, none had noindex, all had their canonical and their content. Nothing technical was holding them back. Google just had to read them and make up its mind.

The indexing figures on 26 NovemberSearch Console report from 16 November: 395 indexed and 486 not indexed. Sitemap on the morning of the 26th: 370 indexed, 203 with no data, 89 discovered and 72 crawled but not indexed. Dashboard at 13:09: 459 indexed and 275 to index.Three snapshots of the same day, three different numbersSearch Console, 16 Nov report: every URL Google knows395 indexed486 not indexed (almost all on purpose)Sitemap, sweep on the morning of 26 Nov: only what I want indexed370203 no data8972The dashboard, 26 Nov at 13:09: Google, URL by URL459 indexed275 to index89 = discovered, not indexed · 72 = crawled, not indexed. The two lower bars add up to 734, the URLs in the sitemap.
The gap between the second and third bars is not Google working faster: the report was ten days old and the dashboard asks with today's data.

There’s a third bar in the drawing that wasn’t in the plan. At 13:09 that same day, the dashboard I describe below already showed 459 indexed and 275 to index. Google didn’t index 89 pages in a couple of hours: the Search Console report was ten days old, and the dashboard asks URL by URL with up-to-the-minute data. That gap was the first lesson of the day: an old report makes you work on problems that no longer exist (and miss the new ones).

The 24 old URLs returning a 404

The sweep did find something that was really holding things back, and it wasn’t in the new content but in the old. 24 old URLs returned a 404: categories that no longer exist (Basic and intermediate Python, Java, Linux and C, Configuration, Setup, Projects and data), addresses from the first English version such as /en/blog-en/en/ and /en/articles/, and loose ones like /fp2/, /cookies-policy/ or /en/tag/linux-en/.

The worst part: three of them were still indexed while returning a 404 (/category/configuracion/, /category/linux-y-c/ and /en/articles/). Anyone who found them on Google landed on an error page.

The cause was curious. Rank Math removes the word “category” from category addresses, and in doing so it sent those old URLs to an empty address. Now a 301 redirect (the one that tells Google “this has moved for good, go here”) catches them first and takes them to the right place. That also got rid of a “Redirect error” Search Console showed for /category/setup/.

Thinking old stuff no longer matters. A URL Google indexed months ago is still there even if you deleted it. If you change your structure, every old address needs its redirect.

There’s one step left in Search Console: under “Page with redirect” and “Not found (404)”, click “Validate fix” so Google checks them again.

The dashboard: a Google sheet that asks for me

Knowing where you stand one day is no use if a month later you don’t know again. So the second part of the day was building something that checks on its own, every day.

The tool was Google Apps Script, which I had never heard of in my life before 26 November. It’s JavaScript that runs for free on Google’s servers with your account: it can read and write your spreadsheets, fetch web pages, send emails and talk to other Google services, such as Search Console. You don’t need a computer switched on or to pay for a server.

Apps Script editor for the "SergioLearns — Indexación" project, with the Código.gs file open and the comment explaining what the script does
The Apps Script editor on 26 November, with the comment at the top of the script: everything it does, in three points (interface in Spanish).

The comment at the top sums it up better than I can. Every morning, the script:

  1. Reads the site’s sitemap. Every published URL lands in the sheet by itself, the same day it goes live (scheduled ones come in when they’re published).
  2. Asks Search Console about every URL that isn’t indexed yet. It uses the URL Inspection API, which gives the same answer as “Inspect URL” in Search Console. A URL only becomes “Indexed” when Google confirms it, never because I requested it. Indexed ones get checked again every 14 days.
  3. Shows what’s missing on a dashboard: a private web page that only my account can open, with how many are missing and a button next to each one that opens it in Search Console.

Google allows 2,000 inspections a day per site. The script uses at most 1,500, in rounds of 150 every ten minutes while there’s work left, because each run can’t last more than six minutes.

SergioLearns indexing dashboard: 459 indexed, 275 to index, 0 not yet checked and 63% of the sitemap indexed, with the list of pending URLs and the "Abrir en Search Console" button
The dashboard at 13:12 on 26 November: 459 indexed, 275 to index, 63% of the sitemap. The "Cómo va" (progress) chart appears from day two. The dashboard is in Spanish.

When I saw it working I thought I’d been missing out on a really useful, versatile tool. Often, out of comfort, you don’t go out and explore new opportunities that, even if they can be overwhelming, speed up repetitive processes, like in a factory.

What it records for each URL

Under the hood, the dashboard is a spreadsheet with one row per URL. For each one it stores since when it’s been in the sitemap, what Google says (“Discovered – currently not indexed”, “URL is unknown to Google”…), the date of the last crawl, when it was checked, since when it’s been indexed and, if Google picked another page as the main one, which. With that, each URL has one of these statuses:

StatusWhat it meansWhat I do
Not checkedIt just entered the sitemapNothing: it gets checked in the next round
PendingGoogle doesn’t have it yet (discovered, crawled but not indexed…)Request it, if it matters
Error404, blocked, noindex…Fix it: here there is a technical problem
IndexedGoogle has itNothing: it gets checked again every 14 days
Out of the sitemapDeleted, redirects or noindexNothing: kept, but not checked

There’s another sheet, “Registro” (log), with one row per day: how many were in the sitemap, how many indexed, how many pending and how many queries were used. That’s where the progress chart will come from from day two. And when I work with Claude there’s no need to open Search Console or take screenshots: the dashboard gives the same list as text, and reading it is enough to update my to-do list.

How we set it up (and the 403 wall)

Setting it up wasn’t “copy and paste”: it was a morning of small walls, between 11 and 11:50.

The first one: the idea was for the script to live inside the spreadsheet itself, but the editor attached to the sheet wouldn’t open (the window stayed blocked). Solution: a standalone script that writes to the sheet from outside.

The second, the big one: the script was already asking Google, but every answer was a 403 error. Apps Script creates a Google Cloud project behind the scenes, and that project, managed by Google, doesn’t let you turn on APIs: “You need additional access”. Before we spotted it, 300 of the day’s queries went on errors.

The Google Cloud 403 error and the steps to fix itThe script asked Search Console from the Google Cloud project that Apps Script creates, which does not allow turning on APIs, so it returned a 403 error. The fix was a project of our own: turn on the API, consent screen in testing, Sergio as a test user, 2-step verification and swap the project number in Apps Script. At 11:50, the first round: 98 indexed and 52 pending out of 150.The 403 wall and how we got over itThe scriptasks Search ConsoleGoogle Cloud projectthe one Apps Script makes (Google's)Error 403"You need additional access"That project won't let you turn on APIs. Before we saw it, 300 of the day's queries went on errors.The fix: a project of my own, "SergioLearns Indexacion"1Turn on the APIfor Search Console2Consent screenin "Testing"3Me as atest user42-stepverification5Link itto the script11:50 · first good round150 URLs: 98 indexed and 52 pendingI did step 4 myself: Google Cloud won't let you go on without 2-step verification.
Top: what was happening; bottom: the five steps that fixed it. The only one nobody could do for me was the fourth.

The fix was to create a Google Cloud project of our own, “SergioLearns Indexacion”, turn on the Search Console API there, set the consent screen to “Testing” mode, add me as a test user and link that project to the script.

Google Cloud felt like a pain to me: the dashboards are overloaded with information and the pop-up tabs are really overwhelming. And in the middle of it all, Google Cloud asked for 2-step verification before it would let me continue. That one I turned on myself, because it’s a setting of my own account.

At 11:50 the first good round came through: out of 150 URLs, 98 indexed and 52 pending. From then on, the rounds kept going by themselves until all of them had been checked.

If you ever build something similar and see “API 403… has not been used in project… or it is disabled”, it isn’t your code: it’s the Google Cloud project. Create your own, turn on the API and change the project number in the Apps Script settings.

When you grant permissions, Google warns that the app “isn’t verified”. That’s normal: the script is mine, it isn’t published and nobody else uses it.

A note on AI, as in the rest of the series: the idea, the content, the anecdotes and the final review are mine; Claude helps me structure and write. In this case, on top of that, Claude wrote the script and we installed it together; the permissions and the decisions (what gets checked, what isn’t touched) were mine.

What I do now

The one thing the dashboard can’t do is request indexing. Google doesn’t allow that through an API for normal pages: its Indexing API is only for job postings and livestreams. So that part is still mine, but now it’s short:

  1. I open the dashboard with the “Por indexar” (to index) filter.
  2. I click “Abrir en Search Console” (open in Search Console) on the ones at the top and, there, “Request indexing”. About 10 a day.
  3. The next day, the dashboard tells me whether Google has them.

Which ones first? The most valuable: the course hubs, the mock exams and the first page of each topic. Then, new articles with no data. “Discovered” ones go after that, and “Crawled, not indexed” ones I hardly request at all: with those, linking to them and improving them works better.

My indexing routine before and after the dashboardBefore: one hour a day opening Search Console, checking, requesting, retrying and fixing, and remembering what was scheduled. Now: the dashboard reads the sitemap at 6:17 and asks Google by itself; I filter "To index" and request about 10 a day.My indexing routine, before and nowBefore1 hour a day, all on my ownOpen Search ConsoleCheck URL by URLRequest and retryFix whatever failsAnd remember what is scheduledNowthe dashboard works; I click a few times6:17 · reads the sitemap (by itself)Asks Google URL by URL (by itself)Me: "To index" filterMe: request about 10, one click eachNext day, the dashboard tells me
What used to be an hour of checking by hand is now done by the dashboard every morning without me touching anything; I keep the one thing Google won't let you automate.

It will save me a lot of time that I can spend on uni or on keeping working on my projects. And above all, it takes away the feeling that something is slipping through my fingers: if a URL falls behind, the dashboard shows it.

What I’ve learned

  • Publishing isn’t being on Google. What I control ends at the sitemap. The rest is Google’s call, and it’s worth knowing which step each page is at.
  • Reports go stale. A ten-day-old report had me worried about 364 URLs when, that same day, 275 were missing. You have to look with today’s data.
  • What breaks is usually the old stuff. The 24 URLs with a 404 came from structures that no longer exist. Every structure change leaves orphaned addresses if they aren’t redirected.
  • Automate what repeats and keep by hand what Google won’t let you automate. Checking statuses is a machine’s job; deciding what to request first is still mine.
  • Technical walls are rarely your code. The 403 wasn’t a script bug: it was a project that didn’t allow APIs.

Questions you might ask

How much does the dashboard cost? Nothing. A free Google account covers all of this: 90 minutes of scheduled tasks a day (a normal day uses about 10), 20,000 requests to web pages and 2,000 URL inspections per site.

Why doesn’t it request indexing by itself? Because Google doesn’t allow it for normal pages. If a script promises to request it through an API for a blog, be wary.

Can anyone else see it? No. The dashboard is a web app only my account can open, and the sheet lives in my Google Drive.

Can I do the same with my site? If your site is verified in Search Console and has a sitemap, yes. The hardest part isn’t the script: it’s Google Cloud (your own project, the API and the consent screen).

And if Google never indexes a page? If it’s been crawled and Google still doesn’t want it, the problem isn’t technical. Check whether it answers something other pages already answer better, link to it from indexed pages and expand it.

What’s next

The indexing dashboard was only the first piece. That same afternoon, the same script learned to watch what gets published every day, to look for broken links, to measure speed and to send me a report on Mondays. And when I looked at the backups, I found out the site wasn’t being backed up on its own.

If you want to see everything behind the site, the series is collected in Behind the site.

Keep goingAll Behind the site articles

Did this article help you? Here is how you can support SergioLearns →