-
-
Notifications
You must be signed in to change notification settings - Fork 350
Description
Description
When using useExtracted with auto-generated message keys, some keys begin with the / character. Google's crawl bot interprets these as URL paths and attempts to crawl them, resulting in Not Found (404) errors reported in Google Search Console.
This is because the auto-generated key character set includes /, which is a valid URL path character. When these keys appear in the rendered HTML or page source, Googlebot treats them as relative URLs.
Screenshot from Google Search Console:
Verifications
- I've read the docs. In particular, I've looked at the relevant usage guide.
- I've searched for existing issues and discussions on GitHub and Stack Overflow.
- I've compared my setup to a working example.
Mandatory reproduction URL
This issue is not reproducible in a code sandbox — it manifests in Google Search Console when Googlebot crawls a production site using useExtracted with auto-generated keys. The auto-generated keys (e.g. ones starting with /) appear in the page source and Googlebot interprets them as relative URL paths, then reports 404 errors.
Reproduction description
- Use
useExtractedwith auto-generated message keys in a Next.js app - Deploy to production and let Google crawl the site
- Open Google Search Console → Pages → Not Found (404)
- Observe 404 entries corresponding to auto-generated message keys that start with
/
Expected behaviour
Auto-generated message keys should not use characters that can be interpreted as URL paths by web crawlers. The character set should exclude URL-significant characters like /, ?, #, &.
Suggestion:
- Use a character set for auto-generated keys that excludes URL-like characters, OR
- Allow users to customize the character set / prefix used for auto-generated keys