next.js 中的动态路由使 google 不会索引我的网站

Min*_*eon 5 next.js google-search-console

我在谷歌上搜索了很多关于这个问题的信息。\n我正在使用React+Next.js V9google search console进行 SEO。

\n\n

Google 只索引我网站的主页。\n我猜这是因为它是动态路由的。\n我通过升级Next.js到版本 9 更改了文件夹结构,因为我认为它可以轻松地动态路由而无需服务器端工作,而且它可以被谷歌索引。然而,一切都没有改变。Google 仅索引主页。(index.js)

\n\n

我在下面添加了我的代码。\n如果您有任何想法,请给我一些建议。\n谢谢。

\n\n

文件夹结构

\n\n
\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 _app.js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 _document.js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 all\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 [filter].js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 category\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 [name].js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 contact.js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 index.js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 privacy-policy.js\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 store\n    \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 [name].js\n\n
Run Code Online (Sandbox Code Playgroud)\n\n
\n\n

商店/[名称]/index.js

\n\n
\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 _app.js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 _document.js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 all\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 [filter].js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 category\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 [name].js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 contact.js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 index.js\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 privacy-policy.js\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 store\n    \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 [name].js\n\n
Run Code Online (Sandbox Code Playgroud)\n