Rogier
Rogier

Reputation: 152

Vue SPA robots meta tag not indexed by Google

For my Vue SPA for which SEO is important; I have written my own function for setting meta tags per route I fire a simple function like this in the created lifecycle hook of my views:

document
    .querySelector('meta[name="robots"]')
    .setAttribute('content', 'index');

The function seems to work, because when inspecting I see the pages that need to be blocked with a noindex value and the pages that need to be indexed with an index value.

But Google search console tells me certain pages are not indexed due to the robots meta tag having the value noindex (contrary to what I expect and see when inspecting).

Is this an issue with timing and the created lifecycle hook maybe?

One of the pages where this issue occurs for extra context: https://trainervinden.nl/blog/afvallen-met-een-personal-trainer

Any help is much appreciated!

Upvotes: 0

Views: 1275

Answers (0)

Related Questions