ItsLhoudini's avatar

VueJS 2 and SEO

I can't really understand if VueJS works fine for SEO.

Here's an example:

I have a page HTML with a custom tag like

<custom-tag :items="{{ $items }}"></custom-tag>

and $items is a laravel's collection.

The VueJS component replace the custom tag like:

<div class="items">
    <ul>
        <li class="one-item">{{ $item }}</li>
        ...
    </ul>
</div>

The answer is: Google crawler (or Bing) will see rendered page with VueJS or the HTML with custom tags? Calling the page with curl it shows the no-render page (of course...).

I have read something like using SSR. Is that necessary? https://vuejs.org/v2/guide/ssr.html#Do-You-Need-SSR

Please help me. Thanx

0 likes
4 replies
topvillas's avatar

I'm no SEO guru, so don't quote me on this but ...

My understanding is that you'll be fine unless you start fetching your data with calls to an API. Crawlers won't hang around for the async call.

mdecooman's avatar
Level 19

Crawlers are more and more capable of handling front end. However not very good at guessing if everything is happening in the front-end. A solution for content based system is to render a static version of the site.

Have a look here, it will give you some hints on the principle: https://prerender.io/

ItsLhoudini's avatar

So, if I have some "prefetched data" and I use VueJS only for dynamic reasons like filter or sort, I would have no problem on SEO indexing?

dawidryba's avatar

@ItsLhoudini yes. If content load without async/ajax then search engines will see your content.

But I think, now search engines see async data.:)

Please or to participate in this conversation.