Google crawling URLs with literal placeholders and getting 5xx

Search console shows hundreds of server errors on URLs like /product/{id}, curly brackets included. Looks like googlebot pulled them out of our javascript. Should I block that pattern in robots.txt, or is there a better fix on the site side?
2

Leave A Reply

Log in to post an answer.

2 Answers

singh_ankur Nov 09, 2026
rumpa_uk
Run one of the URLs through URL Inspection in Search Console. The page indexing details sometimes list a referring page, not always, but when they do it points straight at the template that's leaking. And check the sitemap. I've seen a plugin update start writing {slug} into every sitemap entry, which looks exactly like this.
nikhilm Oct 13, 2026
rumpa_uk
Googlebot is pulling those out of your source, usually a JS template or a JSON blob that has something like /product/{slug} or %7Bid%7D sitting in it. It finds anything that looks like a path and tries it. Search the raw HTML and your JS bundles for the exact placeholder string to find where it's coming from. Fix the template if you can. The more important fix though: those URLs should return a 404, not a 500. A 404 for junk is completely normal and Google drops it. Lots of 5xx tells Google your server is struggling and it can slow down crawling of the whole site. I wouldn't robots.txt them unless the list is huge, the 404 is enough.