Like the title says, if I use Angular2 for my website, does it negatively affect my SEO?
-
I'm voting to close this question as off-topic because it is asking for SEO advice. – unor Nov 11 '16 at 15:08
-
1@unor but it is programming related rather than a content or keyword ranking type question. Also from the other answers it does seem like there is quite a bit of confusion around this in Angular2. – JayChase Nov 12 '16 at 07:30
-
@JayChase: Asking if something is good or bad for SEO is off-topic here. Such questions can be asked on [webmasters.se]. – unor Nov 12 '16 at 10:39
-
I asked this question because I'm uncertain whether Angular 2 works out-of-the-box with regular SEO or if I need to undertake any actions to get the SEO working as usual. – Jelle den Burger Nov 13 '16 at 11:53
2 Answers
Since you didn't specify the details, I'm assuming that you are asking about SPA (Single Page Applications) that use Angular.
For SPA's, if you can get the routing right using Angular routes and also enabling clean routes on the server you are using (ex: .htaccess on Apache), SEO should not get affected.
However there are other things that you need to pay attention to.
Some search engines do not play well with AJAX type page navigation and loading. Since, they don't see all the data loaded at once, they may index partially loaded webpages (though Google has changed their crawling to accommodate this)
You should also ensure that the meta and other keywords and stuff that search engines like are specific to each page if you want a good SEO. This could be a little challenging when doing SPA's.
- 385
- 1
- 3
- 10
-
-
As an example, suppose your angular app is in a folder "myapp" in an apache server and the url is http://url/myapp. Suppose you have a route called "login". If some site links to this url - http://url/myapp/login, it will not work as apache does not understand angular url. You will need to add a rewrite to index.html. Refer to [this link](http://stackoverflow.com/questions/34816025/angular2-routing-deep-linking-not-working-with-apache-404). Similar things will be needed on many of the other servers as well – Kaptrain Nov 11 '16 at 07:07
If you do not provide some form of prerendering then yes search engines cannot crawl Angular2 sites (although Google are working on it) as they have no way of telling when the spa has loaded so they will only see the initial page before the SPA has loaded.
To test your site sign up for Google Webmasters and you can use the Search Console to fetch pages and see them as the Google crawler does.
For prerendering options prerender.io is a good SaaS option which is easy to integrate. Also for Angular 2 you can use Angular Universal for server side rendering, but it is still at an early stage so not that stable.
For more information this Angular Connect talk on SEO best practises is worth a watch.
- 11,174
- 2
- 43
- 52
-
Thanks for your comment, I'm definitely going to check out Google Webmasters. – Jelle den Burger Nov 10 '16 at 12:56
-
By the way, is there a way to verify that Google uses the routes provided within my website its anchor links? – Jelle den Burger Nov 10 '16 at 13:10
-