A single robots.txt rule cleared 957,000 ghost URLs left by a previous site owner
A developer discovered that six weeks after launching a 66-page static Next.js site, Google had indexed only one page while tracking nearly 957,000 URLs on the domain. The domain had previously hosted an e-commerce store, and Google was still crawling hundreds of thousands of old product and query-string URLs that no longer existed. Because the static site returned a 200 status for every query-string variant of the homepage, Google flagged over 335,000 of them as soft 404s and spent its crawl budget on the defunct store instead of the new content. Adding a single robots.txt directive — 'Disallow: /*?' — blocked all query-string URLs from being crawled, freeing the crawl budget for the actual site pages. The developer also corrected an over-eager sitemap that stamped every page with the latest build time, which had caused search engines to treat all pages as perpetually updated.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in