-1

I have been working in nextjs since recently. I previously programmed in react, but the project requires me to use nextjs.

Briefly the application looks like this

  • Home page (simple backend data + form ), here I will 100% use SSR
  • Admin panel (/admin)

And here I am wondering whether to use SSR or CSR in admin page, I find conflicting information. If I use CSR in case of admin panel, will it somehow affect SEO? (I think it shouldn't, since the site requires a login anyway). I read that if the site requires authentication then there is no point in rendering the data on the server side. But on Reddit someone also wrote that simple admin pages can also be safely created using SSR. If so, does it give any advantages?

Or, however, would it be worthwhile to separate it into 2 different applications with the annotation (admin.mywebsite) in the domain? and what is the correct approach to such a problem? I care about the best possible SEO, hence my questions.

Filbert
  • 13
  • 2
  • 1
    If you have a robots.txt that indicates that /admin should not be scrapped I think you should be fine doing CSR in your admin pages – Axnyff Nov 06 '22 at 15:20

1 Answers1

2

If you don't need the casual user to see the admin panel, you can simply ignore it in your robots.txt file and use any preferred method (CSR or SSR), and it won't impact your SEO.

However, in the case you do want users to see the admin panel (for any future viewers), SSR is much more scrapable by web robots and is preferred for SEO.

LeoDog896
  • 3,472
  • 1
  • 15
  • 40
  • The admin panel is not to be indexed, it will only be visible by / admin – Filbert Nov 06 '22 at 15:28
  • Perfect! Then you can as suggested just ignore it with `robots.txt` from any web scraper so it wont appear in SEO. – LeoDog896 Nov 06 '22 at 15:32
  • And out of curiosity, if I didn't exclude the admin panel in roots.txt, even though the admin needs to be authenticated, would that negatively affect SEO? – Filbert Nov 06 '22 at 15:41
  • If that admin panel has more routes underneath it, then it can affect SEO. Google won't mind one 1-off login page, but if there is more and it crawls them it'll think you're "repeating pages" which will harm SEO. – LeoDog896 Nov 06 '22 at 15:44