seo - Googlebot and other crawlers are clicking on javascript links -


we running vue.js on 1 of our applications, , generating anchor tags it. google crawling this, can see search results. however, crawling bot has javascript disabled, , encounters links following:

<a href="/electronica/{{ auction.main_image_big }}"></a>

this generating errors in our laravel application, because come our webserver as:

/electronica/%7b%7b%20auction.main_image_big%20%7d%7d

what best approach prevent crawler without javascript enabled click on these links. redirect them page?

keep in mind still want googlebot crawl these links when javascript enabled, because these links lead of our products.

use v-bind instead:

<a v-bind:href="'/electronica/' + auction.main_image_big"></a> 

or v-bind short version , es6 string templates:

<a :href="`/electronica/${auction.main_image_big}`"></a> 

as won't turned href attribute without javascript enabled, bot skip those.

it's future-proof regards vue 2.0, interpolations in attributes being removed.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -