I search on google a lot about this issue.
I'm using React
+Next.js V9
and google search console
for SEO.
Google only index main page from my website.
I guess it's because it's routed dynamically.
I changed folder structure with upgrading Next.js
to version 9 because I thought it could make easily route dynamically without working server-side and it could be index by google. However, nothing changed. Google only index main page.(index.js)
I add my code below. If you have any idea, please give me some advice about this. Thank you.
Folder Structure
├── _app.js
├── _document.js
├── all
│ └── [filter].js
├── category
│ └── [name].js
├── contact.js
├── index.js
├── privacy-policy.js
└── store
└── [name].js
Store/[name]/index.js
// ...
// This link routes specific store. It works very well, but just can't index from google
<Link href={`/store/[name]`} as={`/store/${store.name}`} passHref>
<a><BtnSeeMenu>See Menu</BtnSeeMenu></a>
</Link>