paolopolix paolopolix - 6 months ago 19
AngularJS Question

Search results show Angular placeholders as page titles

I've just uploaded my first angular site. When I check on Google to see whether it is indexed, I see this:

site:paolopolichetti.it

It is the dynamic angular code to set dynamic title/description.. How can I avoid this?!

Answer

In order to make pages without hash fragments crawlable, you need to include <meta name="fragment" content="!"> tag in the head of the HTML of your page.

However, full good solution for your case could be https://prerender.io/

The Prerender.io middleware that you install on your server will check each request to see if it's a request from a crawler. If it is a request from a crawler, the middleware will send a request to Prerender.io for the static HTML of that page. If not, the request will continue on to your normal server routes. The crawler never knows that you are using Prerender.io since the response always goes through your server.

As a custom solution you can use fallback pages

In case the requesting resource doesn’t parse JavaScript, Fallback pages which as HTML pages are displayed instead. Fallback pages which are basically static pages typically try to replicate the functionality and content of JavaScript web application by way of the server-side rendered pages. These pages do comprise of the same content that the JavaScript application would show in addition to making use of standard index-able links for navigation.

http://www.promotejs.com/seo-strategies-for-javascript-heavy-single-page-applications-or-ajax-sites/

Comments