You're seeing 404 errors in your Google Search dashboard for URLs that are not valid for your site. You may also see 404 errors in your web server logs for these paths. After searching your site, you find that the site path is present as a string in the browser agent loader script being injected into your HTML.
The browser agent makes use of string literals in code but converts those to string concatenation during the build process to prevent possible issues with code that may wrap the loader string in a string literal. In some cases, this may lead to strings that begin with a forward slash
/. This means that when Google indexes the page containing the agent loader script, it will store these strings as potential paths for your site and attempt to index them.
This is not an uncommon scenario for site administrators and is not just linked to the browser agent. There could be many reasons for strings to appear in your site HTML and cause Google Search to perceive them as a potential path. Here are some resources that demonstrate how others have addressed this concern:
- How can I block Google from crawling things it thinks are URLs from NEXT_DATA?
Available internet resources indicate these 404 errors will not affect your site ranking or indexing. They can be safely ignored. However, if you are still concerned, you can reach out to the Google Search Support Community to get additional feedback and help.