AngularJS SEO - Once and for all

0 votes

currently google is not considering my pages except my homepage and data from the  $http request don't showing up i will give the sorce code of what i was doing 

Set base tag in the <head>:

<base href="/" />

Create .htaccess:

RewriteEngine On 
Options FollowSymLinks

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /#/$1 [L]

Add to app.config:

$locationProvider.html5Mode(true);

Exemple to my app.config:

function createState(name) {
    return {
        url: '/' + name + '/:id',
        templateUrl : 'templates/pages/' + name +'.html',
        controller : 'singlePage',
        resolve: {
           pageData: function(getData, $stateParams) {
                var params = $stateParams;
                params.type = this.self.name;
                return getData.getPageData(params.type, params)
           }
        }
    }
}
.state('info', createState('info'))
.state('news', createState('news'))
.state('event', createState('event'))

$urlRouterProvider.otherwise('/');
$locationProvider.html5Mode(true);
Feb 18, 2022 in Others by Kichu
• 19,050 points
98 views

1 answer to this question.

0 votes
javascript is not compiled by google bots so it always get to index the page of the website
you can counteract  with some basic seo functionalities
but for all the solution there arrives the next problem there are some limitations to all this
one is the social cotents and the other one is the title tags so keep your notice on this
answered Feb 20, 2022 by narikkadan
• 52,760 points

Related Questions In Others

0 votes
0 answers

Replacing H1 text with a logo image: best method for SEO and accessibility?

i want to link my logo to ...READ MORE

Feb 14, 2022 in Others by Kichu
• 19,050 points
2,085 views
0 votes
1 answer

Rendertron for NuxtJS and Firestore site for SEO purposes

reconfigue the server setting  app.use(rendertron.makeMiddleware({ proxyUrl: 'https://ampedcast-7c1d6.uc.r.appspot.com/render', ...READ MORE

answered Feb 21, 2022 in Others by narikkadan
• 52,760 points
366 views
0 votes
1 answer

Replacing H1 text with a logo image: best method for SEO and accessibility?

<h1> <a href="http://stackoverflow.com"> ...READ MORE

answered Feb 21, 2022 in Others by narikkadan
• 52,760 points
662 views
0 votes
1 answer

Limit the size of the existing and new permalink slugs in Wordpress for SEO

?php   /**  * Trim native slugs  */ function pm_trim_native_slug($slug, $post_ID, ...READ MORE

answered Feb 25, 2022 in Others by narikkadan
• 52,760 points
713 views
0 votes
0 answers

Angular and SEO indexing

app.config(["$routeProvider", function($routeProvider) { $routeProvider .when("/", ...READ MORE

Feb 14, 2022 in Others by Kichu
• 19,050 points
55 views
+1 vote
1 answer

What is the relationship between angularjs Scope with controller/view?

Let us consider the below block: <div ng-controller="emp"> ...READ MORE

answered Jan 20, 2020 in Web Development by Niroj
• 82,840 points

edited Jan 21, 2020 by Niroj 518 views
+1 vote
1 answer

What is css box module?

Hey, All the element present in html follows ...READ MORE

answered Jan 20, 2020 in Web Development by Niroj
• 82,840 points

edited Jan 21, 2020 by Niroj 616 views
0 votes
3 answers

Explain the difference between visibility:hidden; and display:none?

display:none means that the tag in question will ...READ MORE

answered Dec 14, 2020 in Web Development by Gitika
• 65,910 points
103,763 views
0 votes
1 answer

AngularJS SEO - Once and for all

java script cant be or wont be ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 52,760 points
93 views
0 votes
1 answer

All in one seo pack and qtranslate title attributes

try changing one of the plugins and ...READ MORE

answered Feb 17, 2022 in Others by narikkadan
• 52,760 points
64 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP