reactjs - how to index dynamic routes in google using nextJS
问题描述
I know how to use reactJS, but now I am creating a web page made with nextJS to improve SEO, but I have a question.
How do I make my dynamic routes made with NextJS known to google? I understand that we have getStaticPaths and in routes we can put all the routes and by setting fallback to true we can add the dynamic routes without specifying them, but how do I do when I have a million routes and I want google to index them and they can appear in the searches? Thank you very much I hope someone helps me: D
解决方案
You can provide a sitemap, that search engines use to define what paths your site contains. That way they know which paths to crawl through.
Googling sitemap + next.js gave this tutorial for example, but for super simple site you could just define it manually too: https://cheatcode.co/tutorials/how-to-generate-a-dynamic-sitemap-with-next-js
推荐阅读
- python - 按照 MVC 模式创建一个 Django 项目?
- c# - 在c#中合并datagridview中的列
- python - 如何在一些想要的字母之后提取字符串?仅使用 python 2.0 和 numpy 和 pandas
- elasticsearch - 在kibana汇总作业中获取给定间隔的连续时间戳
- jquery - select2 占位符显示组文本和子项
- json - 如何使用 Java 在 Google 电子表格中创建复选框
- c# - 如何正则表达式。仅替换我捕获的组?
- flutter - 在 Flutter 项目中为 iOS 导出存档时 Codemagic 或 Fastlane 失败
- node.js - 为什么我无法将变量从一个文件导出到另一个文件
- java - javax.net.ssl.SSLHandshakeException:收到致命警报:非法参数