Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is angular.js with ui-router SEO friendly?

For instance, if the content loads dynamically and has hashed URLs like "mysite.com/#/some/page" is that SEO friendly or will it not be indexed by Google and Bing?

like image 508
Geoff Avatar asked Oct 18 '13 22:10

Geoff


People also ask

Is AngularJS SEO friendly?

In Angular 11 and newer versions, Google included new default libraries to make Angular fully SEO-friendly. The libraries allow the required meta tags to be edited and set, either configuring Angular Universal to start-up in a pre-render mode or letting the application manage the state itself.

What is UI router in AngularJS?

Angular-UI-Router is an AngularJS module used to create routes for AngularJS applications. Routes are an important part of Single-Page-Applications (SPAs) as well as regular applications and Angular-UI-Router provides easy creation and usage of routes in AngularJS.

Can Google crawl Angular?

Server-side rendering with Angular Universal Another method to make angularjs SEO friendly can use Angular Universal Extension to create static versions of web pages that can be rendered on the server-side. Google's bots can easily reach and crawl them and provide indexes to your pages.

What is AngularJS used for?

AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. AngularJS's data binding and dependency injection eliminate much of the code you would otherwise have to write.


2 Answers

Since search engines do not run javascript, you need to make static html versions for your pages so they can be indexed by them, also you should have a sitemap. There is a library that helps acomplish this using phantomjs: https://github.com/steeve/angular-seo This is further explained here: http://www.yearofmoo.com/2012/11/angularjs-and-seo.html

There are some paid services that take care of this for you.

Also Google has some more information on the matter: https://developers.google.com/webmasters/ajax-crawling/

like image 118
Marco Rivadeneyra Avatar answered Oct 13 '22 00:10

Marco Rivadeneyra


Even if you have statically generated versions of your pages, Google doesn't follow the ui-sref directives that ui-router provides. Your best option is to use ng-href in combination with the escaped fragment ajax crawling specification. The project I'm currently working on is based on MeanJS which has a SEO module that implements the escaped fragment and is definitely working with Google.

MeanJS does include ui-router, but I only use it from the controllers, not in the views.

like image 43
snez Avatar answered Oct 13 '22 01:10

snez