Urgent.News

What's breaking now, across thousands of outlets.

Tech

One React component cost me 98 unindexed pages

Google had indexed 21 pages of my site. Another 98 sat in Search Console under Discovered - currently not indexed , and the number was climbing. I spent a week on the wrong explanations. Thin content, maybe. A new domain with no authority. Too many similar pages. All plausible, all wrong. The cause was four characters in a React component. The Symptom - Reason Pages - Discovered — currently not…

Google indexed only 21 pages of a site, leaving 98 pages in the "Discovered - currently not indexed" category. For a week, the cause was unclear, with explanations like thin content or a new domain not holding up. The issue stemmed from four characters in a React component. The Symptom was 98 pages missing from the index. In reality, the redirects and canonical tags were functioning correctly.

The 98 unindexed pages were the problem, with "Discovered" indicating Google knew their existence but chose not to crawl them. The cause was due to the React component not creating links for tool pages, rendering them invisible to crawlers. The fix was simple: add the "hidden" attribute to the navigation when the category was closed, ensuring the links were not rendered.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Origami - You, on your terms

Hey all. Wanted to share my personal project - Origami - with everyone again now that I feel it's in a good place with the latest v27.

More from Monday 12 October →