ANGULAR_NO_UNIVERSALAngular app without Universal (SSR)
Client-side Angular apps send empty HTML to crawlers.
Add Angular Universal for SSR:
ng add @angular/ssr
This adds server-side rendering to your Angular app.
These are the Angular-specific checks RankCLI runs, and the fix for each one in Angular's own idiom. Angular renders on the client by default, which is where most of its SEO problems come from.
Run all of these against your own site, free and without an account:
npx @rankcli/cli audit -u https://your-site.devANGULAR_NO_UNIVERSALClient-side Angular apps send empty HTML to crawlers.
Add Angular Universal for SSR:
ng add @angular/ssr
This adds server-side rendering to your Angular app.
ANGULAR_NO_TITLE_SERVICEAngular has built-in services for managing title and meta tags.
Use Title and Meta services:
import { Title, Meta } from '@angular/platform-browser';
@Component({...})
export class ProductComponent {
constructor(
private title: Title,
private meta: Meta
) {}
ngOnInit() {
this.title.setTitle('Product Name | Your Site');
this.meta.updateTag({ name: 'description', content: 'Product description' });
this.meta.updateTag({ property: 'og:title', content: 'Product Name' });
}
}
ANGULAR_LAZY_LOAD_MISSINGLoading all modules upfront increases initial bundle size.
Use lazy loading for routes:
const routes: Routes = [
{
path: 'products',
loadChildren: () => import('./products/products.module')
.then(m => m.ProductsModule)
},
// Or with standalone components
{
path: 'about',
loadComponent: () => import('./about/about.component')
.then(m => m.AboutComponent)
}
];
ANGULAR_PRERENDER_MISSINGStatic pages should be prerendered at build time.
Configure prerendering in angular.json:
{
"projects": {
"your-app": {
"architect": {
"prerender": {
"options": {
"routes": ["/", "/about", "/contact"]
}
}
}
}
}
}
Run: ng run your-app:prerender
ANGULAR_CHANGE_DETECTIONOnPush change detection improves performance significantly.
Use OnPush for components:
@Component({
selector: 'app-product',
changeDetection: ChangeDetectionStrategy.OnPush,
template: `...`
})
export class ProductComponent {}
ANGULAR_LARGE_BUNDLEBundle over 500KB significantly hurts performance.
// angular.json
"optimization": true,
"buildOptimizer": true
ng build --stats-json
npx webpack-bundle-analyzer dist/your-app/stats.json
ANGULAR_NO_IMAGE_DIRECTIVEAngular 15+ has built-in image optimization.
Use NgOptimizedImage directive:
import { NgOptimizedImage } from '@angular/common';
@Component({
imports: [NgOptimizedImage],
template: `
<img ngSrc="/hero.jpg" width="1200" height="630" priority />
`
})
280+ checks including every one above. No signup, nothing leaves your machine.
Run a free audit