SEO·AEO·GEO

SEO by platform · Updated

Angular SEO: server-side rendering and metadata

A client-rendered Angular app sends crawlers an empty app shell. Angular's built-in server and hybrid rendering (added with ng add @angular/ssr) renders pages to HTML on the server or at build time, and its Title and Meta services set per-route metadata.

Aalhad, Founder, SEO·AEO·GEO

Founder, SEO·AEO·GEO

Builds SEO·AEO·GEO and writes the crawler, schema, and citation research published here.

How Angular serves pages to crawlers

By default an Angular app renders in the browser. With Angular SSR, routes can be server-rendered on each request, prerendered at build time, or left client-rendered, configured per route.

Add server-side rendering

ng add @angular/ssr

This sets up server rendering and hydration. Angular's docs describe server-side rendering as improving SEO and performance because the HTML is available before the JavaScript runs. Prerender (static generation) routes whose content doesn't change on every request.

Titles and meta tags

import { Meta, Title } from '@angular/platform-browser'

export class ProductPage {
  private title = inject(Title)
  private meta = inject(Meta)
  ngOnInit() {
    this.title.setTitle('Blue Widget | Example')
    this.meta.updateTag({ name: 'description', content: 'A blue widget that...' })
  }
}

You can also set titles in route definitions with the title property.

Checklist

  • Make sure data needed for the page is loaded during server rendering.
  • Use routerLink on <a> elements so links are real hrefs.
  • Use path-based routing, not hash routing.
  • Return a real 404 status for unknown routes from the server.
  • Avoid browser-only APIs during server rendering; guard them so rendering doesn't fail.
  • Check robots.txt allows the AI search crawlers you want: OAI-SearchBot (ChatGPT search), Claude-SearchBot, PerplexityBot. See the AI crawler list and the robots.txt generator.
  • Check your host's or CDN's bot protection doesn't block them even when robots.txt allows them.
  • Make sure the main text is in the HTML the server sends. AI crawlers don't run JavaScript.
  • Avoid nosnippet and tiny max-snippet values on pages you want quoted; they also keep pages out of Google's AI Overviews.

Check it on your own site

What the free audit tests for this

  • Raw HTML visibility
  • Title tag
  • Meta description
  • Internal links

One URL, about 20 seconds, no login. You get the result of every check and the exact fix for the top three issues.

Audit your website free

FAQ

Is Angular bad for SEO?+

Not with server-side rendering or prerendering. Client-only Angular apps are harder for search engines and unreadable for AI crawlers.

Is Angular Universal still used?+

Angular's SSR support now lives in @angular/ssr, which replaced Angular Universal.

Sources

  1. Server and hybrid rendering — Angular Docs
  2. Understand JavaScript SEO basics — Google Search Central