Meteor title & SEO

Hi,

My app was developped with the Mantra architecture. I use React and Flow Router.
At this moment, all my route have the same title, my domain’s name.

How can I change this ? And what packages should I use for a good SEO ?

Thanks :slight_smile:

Try this https://github.com/kadirahq/meteor-dochead. It should be good solution for you.

Thanks, DocHead is good for meta Tag.

But for SEO, the only way is prerender.io ?

Mantra supports SSR (server-side rendering), thanks to react, so you don’t need prerender for SEO purpose :

https://kadirahq.github.io/mantra/#sec-Server-Side-Rendering-SSR-

You can still use prerender though.

And what packages should I use for a good SEO ?

As for SEO, you should use Dochead as mentionned before for settings Meta tags, and gadicohen:sitemaps is a great package to generate a sitemap.

I’ve written an article on Meteor SEO with prerender, you might find it useful !

Even thought, using Mantra, I’d rather go for the SSR way

Thanks for the reply.

But I’m not fan of the SSR now. I read that it is very CPU intensive for React…
And Kadira response to use SSR in production is not so good for now

Can I use this on Production?

It’s depend on how you write your app. We are 80% feature complete
and now we can call this is in alpha stage. At Kadira we use this in
production for our main site. https://kadira.io.

But, we might have breaking changes. We’ll try to maintain semver, but that’s not a promise.

I see your article, it is very useful !
Yesterday I test it with prerender but in the Google Webmaster tools the result was not good… google only see head and script, not the html of the page…

I will try to night again if I have time, because I thinks I don’t setup prerender in the good way.

PS : You’re french, aren’t it ?

Yes I am :slight_smile:

You may find this thread useful - particularly this post:

Thanks, I will look at this to night if I can :slight_smile:

How many people do you expect to be using your application? You can cache the rendered pages, as seen lower down the Github page: https://github.com/kadirahq/flow-router/tree/ssr

By default it’s 10 seconds, which is too short. If your app isn’t expected to change very much, You can set it to every hour, day, week or whatever. It won’t use much of your CPU at all then (in fact, it will reduce load).

I’ve used SSR with caching myself and it’s worked well.

You might want to consider React Helmet as well.

1 Like

I expect many people at the same time (100, 1000, ++)…I don’t know at this time…so I’m scared about that :confused:

I also recommend React Helmet. Keep it NPM based. Makes testing far easier when not dealing with those pesky import transforms from meteor modules.

1 Like

Well for reference, I had about 200 users on my app. I set my SSR cache timing to 1 hour and never had issues with CPU on a $5 DO droplet. So long as you’re able to use caching (it doesn’t cache data, only the templates etc) you won’t have any issues with SSR.

Thanks for your return :slight_smile:

But I see that SSR in mantra is not well integrated now :confused:

https://talk.mantrajs.com/t/kickstarter-is-an-out-dated-mess-deprecate-or-renovate/366/25

So I don’t know if it’s good solution now. The work around is a little tricky (add symlink to client folder…)

That is a fork of Mantra right? The Kickstarter fork? From what I can see, these are the changes you’d need to make: https://github.com/osterkraft/meteor-mantra-kickstarter/commit/489b30cab7fde2cce63240ec690ceeb908654da2

There’s also this post: https://talk.mantrajs.com/t/ssr-for-mantra-toss-baby-with-bath-water/454

In my case I used SSR in my lib folder, but as I say I wasn’t using Mantra so not 100% sure if that would work. According to the above post you can make an app directory and put your stuff in there though.

Also to add, to make SSR work you need the views to be available on the server as well as client. Hence why I used the lib folder. Not sure if it’s the most secure method, however, so some input from someone else would be good.

That is a fork of Mantra right? The Kickstarter fork?

It’s a pull request for the mantra kickstater project.
I keep under my hat the idea to switch for SSR until there a stable implementation with the mantra architecture :slight_smile:

With prerender, my website is a little on google :slight_smile: But I need more optimization again !