Last 2015 Method to Make Your Angular Projects SEO Optimized

I built a large angularJS site and made it into several languages, partially downloading json files. My site is full of these lines:

{{ 'TITLE' | translate }} 

I am not sure how to make them SEO friendly. I found many solutions on the Internet, but also many people who said they were no longer needed because Google and Bing could crawl angular projects.

So, I set my project to html5 = true, but it created an error that <base> missing. So I implemented <base href="/"> , but later my project was deployed to a subfolder / stage / so that all the links broke. (my developer and living environment have different bases)

I am not happy that I rely on a 3rd party like prerender.io

What is the latest way to get your angular projects for SEO. And is there a localhost solution? Can Grunt possibly redo all my pages so that I can implement it in my build script?

+5
source share
1 answer

In fact, you can create your own service similar to Prerender.io. He relies on using PhantomJs to render pages.

First, you add the following meta tag to the head of your site:

 <meta name="fragment" content="!" /> 

Jesse Lawson created the SEO module that you add to your website, and then you just need to configure PhantomJs on your web server.

Here are the details:

http://lawsonry.com/2014/05/diy-angularjs-seo-with-phantomjs-the-easy-way/

+4
source

Source: https://habr.com/ru/post/1210656/


All Articles