Menu

My auth middleware sent Googlebot into a redirect loop. My health checks said 200.
📰

My auth middleware sent Googlebot into a redirect loop. My health checks said 200.

DEV Community: nextjs·Ankit Gupta·13 days ago
#cgrkyWk0
#devtonextjs#devto#dev#middleware#provider
Reading 0:00
15s threshold

I run a resume builder for Indian job seekers. In September I moved it to a hosted auth provider, and within a week Google impressions went from about a hundred a day to four. Nothing in my monitoring noticed. Here is what happened, how I found it, and the two checks that would have caught it on day one.

The symptom

Search Console, impressions per day, before and after the cutover:

before 45 to 146 / day after 4, 3, 5 / day

Enter fullscreen mode

Exit fullscreen mode

Every page still showed as "Submitted and indexed", so it did not look like a de-indexing. The brand query, the one people type when they already know the site, went from about 60 a week to roughly zero. Humans could use the site the whole time. Only search traffic died.

What the provider's middleware does

The auth middleware runs on every request.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.