React SSR Server Side Rendering for SEO before login and after login Create React App CRA How to do this in one project folder

0 votes

Before login Website will be SEO with next js or some other way. And has few pages like blog, blog details, about, contact, and products etc.

After login Normal feature like post, post details with CRA(Create React App) setup.

My question is how do we setup the project with before login in SSR and after login. I don’t want SSR after login because there are lots of load on server for each features and functionality. Is there any solution?

Mar 6, 2022 in Digital Marketing by Kichu
• 19,040 points
780 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Use SSR-for-bots middleware to apply SSR to certain routes if only you are using the express server.

const ssrForBots = require("ssr-for-bots");

const defaultOptions = {
  prerender: [], // Array containing the user-agents that will trigger the ssr service | uses Regex
  exclude: ["/routesAfterLogin/"], // Array containing paths and/or extentions that will be excluded from being prerendered by the ssr service | uses Regex
  useCache: true, // Variable that determins if we will use page caching or not
  cacheRefreshRate: 86400, // Seconds of which the cache will be kept alive, pass 0 or negative value for infinite lifespan default 24 hours
};

app.use(ssrForBots(defaultOptions));

If you use it in this way you can separate the paths like, The path before login will be SSR and the path after login will be excluded from this.
answered Mar 10, 2022 by narikkadan
• 63,600 points

edited 6 days ago

Related Questions In Digital Marketing

0 votes
1 answer

React / Relay server side rendering and SEO friendly application

https://github.com/denvned/isomorphic-relay  & https://github.com/denvned/isomorphic-relay-route these two git repositories are created to ...READ MORE

answered Mar 12, 2022 in Digital Marketing by narikkadan
• 63,600 points
966 views
0 votes
0 answers

What is Keyword Density and how to create a script in PHP?

I am Working on a project to ...READ MORE

Mar 12, 2022 in Digital Marketing by Kichu
• 19,040 points
633 views
0 votes
1 answer

How to over-ride meta data in Wordpress, using Squirrly SEO

if (is_archive()){ add_filter('sq_title', 'filter_product_wpseo_metadesc'); function filter_product_wpseo_metadesc($wpseo_metadesc){ ...READ MORE

answered Mar 1, 2022 in Digital Marketing by narikkadan
• 63,600 points
958 views
0 votes
1 answer

How to remove home page title in Yoast SEO?

Here, you have two possibilities. You can ...READ MORE

answered Mar 4, 2022 in Digital Marketing by narikkadan
• 63,600 points
3,250 views
0 votes
0 answers

How to over-ride meta data in Wordpress, using Squirrly SEO

I currently have a Wordpress website using ...READ MORE

Mar 4, 2022 in Digital Marketing by Kichu
• 19,040 points
649 views
0 votes
0 answers

Text should be kept in ppt, pdf, or on html pages to get more SEO benefits and good results at SERP

best method/option for the text to be ...READ MORE

Mar 6, 2022 in Digital Marketing by Kichu
• 19,040 points
640 views
0 votes
1 answer

SEO-friendly React-Redux app

server-side rendering is needed to do seo ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 63,600 points
525 views
0 votes
1 answer

SEO-friendly React-Redux app build

actually best choice is to use Nextjs ...READ MORE

answered Feb 24, 2022 in Others by narikkadan
• 63,600 points
722 views
0 votes
1 answer

Facebook debugger does not pick up Next.js next-seo meta tags

It's a common pattern to have a ...READ MORE

answered Feb 26, 2022 in Others by narikkadan
• 63,600 points
5,447 views
0 votes
1 answer

"SyntaxError: Invalid or unexpected token" - How to SSR images/css with react

The first thing to highlight is that ...READ MORE

answered Jun 1, 2022 in CSS by Edureka
• 12,690 points
4,457 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP