You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm managing a website built using Next.js, where each language has its own designated page URL. However, we're encountering an issue with Google indexing nonexistent URLs that are an incorrect mix of language codes and page names. For instance, we're seeing indexed 404 URLs like "website.com/en/kontakt".
Does anyone have a clue what is causing that? Is it related to the library or not?
Existing Pages (examples):
English (EN)
website.com
website.com/contact
Polish (PL)
website.com/pl
website.com/pl/kontakt
Nonexistent Indexed Pages:
website.com/en/kontakt
...and all other available combinations for languageCode/kontakt
We've noticed that Google is indexing over 150 pages such as "website.com/en/kontakt". It's important to note that no link leads to such URL, it can only be accessed manually.
The links are mapped from translations. t(navbar.${menuItemTxt}_lists, { returnObjects: true }).map()...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm managing a website built using Next.js, where each language has its own designated page URL. However, we're encountering an issue with Google indexing nonexistent URLs that are an incorrect mix of language codes and page names. For instance, we're seeing indexed 404 URLs like "website.com/en/kontakt".
Does anyone have a clue what is causing that? Is it related to the library or not?
Existing Pages (examples):
English (EN)
website.com
website.com/contact
Polish (PL)
website.com/pl
website.com/pl/kontakt
Nonexistent Indexed Pages:
website.com/en/kontakt
...and all other available combinations for languageCode/kontakt
We've noticed that Google is indexing over 150 pages such as "website.com/en/kontakt". It's important to note that no link leads to such URL, it can only be accessed manually.
The links are mapped from translations.
t(
navbar.${menuItemTxt}_lists, { returnObjects: true }).map()...
{ "slug": "/pl/kontakt", "anchor": "Kontakt", "description": "...", },
<NextLink href={item.slug} passHref> <LinkOverlay> {item.anchor} <Text> {item.description} </Text> </LinkOverlay> </NextLink>
Beta Was this translation helpful? Give feedback.
All reactions