Are Subsequent Pages Also Crawl-able (SEO) When We Change Route In NextJs Application?
So then, my question is -
- Is this about page SEO-friendly? (because it's not HTML file)
- If not, then does it mean only initial page is good for SEO and not subsequent routes?
I assume you are asking specifically about the client-side transition with the
You can argue that not all crawlers do that and that there are still advantages in SSR. Luckily, NextJs gives you the best of both worlds:
When you use the
next/link component, e.g.
<Link href='/about'>About Us</Link>
then the resulting markup you see from the server side render will be
<a href="/about">About Us</a>
If you click on the link, nextJS prevents the browser from making a request to /about (with
event.preventDefault();) and handles the action instead with the built in router to render the new page on the client. However, if you access /about directly (typing it into the url bar of the browser), then you will get the server-side generated response for it.
With that in place:
<a>tags and follow them by making new requests. Client-side transitions do not happen in this case and the result will be server side rendered.
That being said, Googles documentation on how to make your links crawlable seems to imply that it doesn't simulate click events on
<a> tags, but makes a new request for the url it finds in the href attribute:
Google cannot follow links without an href tag or other tags that perform a links because of script events. [...] Ensure that the URL linked to by your tag is an actual web address that Googlebot can send requests to [...]
So overall the NextJs routing is SEO-friendly, no matter how it's crawled.
- → Import statement and Babel
- → should I choose reactjs+f7 or f7+vue.js?
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → .tsx webpack compile fails: Unexpected token <
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → React Native with visual studio 2015 IDE
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM
- → How do I determine if a new ReactJS session and/or Browser session has started?
- → Alt @decorators in React-Native
- → How to dynamically add class to parent div of focused input field?