Skip to content
Searchpedia SEO field notes Callum Bennett Callum

Site ops

SEO in AEM

If your AEM site's pages aren't appearing in search, the problem is almost always a badly configured URL or a missing canonical tag, not the content.

Beginner3 min readUpdated 2026-07-27Notes by Callum Bennett

Start here

  • Set a manual page name in AEM page properties to avoid auto-generated query strings and inconsistent URLs.
  • Configure canonical tags on every template to handle multiple selectors, parameters, and paths that AEM creates.
  • Block staging and author environments in robots.txt before launch to prevent indexation of non-public content.
  • Generate an XML sitemap from AEM's built-in tools and submit it via Search Console to speed up discovery.
  • Use hyphenated, lowercase page names and avoid special characters—AEM will not clean these up for you.

Plain-English take

AEM SEO is the plumbing behind your content. I can write the most thorough article in the world, but if AEM generates a URL like /content/dam/mybrand/en/products/product123.html?lang=en and leaves no canonical tag, search engines won't serve it properly. I have seen this happen on live sites. AEM gives you the controls to fix it — page properties for titles and metadata, template settings for canonicals, and dispatcher configurations for redirects — but they are scattered across the interface.

What I do first is check the default page naming. AEM often uses a node-based path that includes content and language folders. You can override this by setting a Page Name in the page properties dialog. That simple step lets me create /products/product123 instead of the auto-generated mess. I also confirm that the [robots.txt](/robots-txt/) file blocks the author environment and any staging instances. One client had their staging site fully indexed because nobody checked this.

Beyond that, AEM can generate and manage XML sitemaps through its replication agents. I use that to ensure new pages are discovered quickly. And I never skip [canonical tags](/canonical-tag/) — AEM can reach the same content through selectors or different domains, so I set a canonical on every template. The result is a crawlable foundation that lets the rest of my SEO work actually matter.

When it actually matters

The first scenario is a site migration or relaunch. When you move pages to new URLs or restructure the hierarchy, old addresses need to return a 301 redirect to preserve search equity. AEM's dispatcher or Apache rewrite rules can handle this, but you must map the old path to the new one explicitly. If you skip this step, you lose the rankings built over years.

The second scenario is multilingual or multiregional sites. AEM's content hierarchy often mirrors language folders — /en/, /fr/, /de/. Without [hreflang tags](/hreflang-tags/), Google may treat translations as duplicate content and pick the wrong language to show in results. I configure hreflang in the page properties or via a custom component, and I pair it with a self-referencing canonical to reinforce the language version.

The third scenario is large content volumes. When you have thousands of pages — for example, product listings with many variations — AEM's information architecture and taxonomy directly affect crawlability. I follow Adobe's guidance on using clean URL structures: hyphenated, lowercase, and preferring first-level subpaths over subdomains. Subdomains are treated separately by search engines, so /en/products/ is safer than en.brand.com/products/. This decision also makes [website structure](/website-structure/) easier to maintain.

What I got wrong

I assumed AEM handled URLs automatically. When I first worked on an AEM site, I thought the platform would strip out the /content/ segment and apply clean naming. It does not. You have to explicitly set the page name and avoid special characters. I learned this when I inherited a site where every product URL included a version number (e.g., v1.2) that kept changing. Each update created a new URL, and the old ones were left to rot. Now I treat the page name as a permanent SEO decision.

I forgot to block staging environments. During a launch for a retail client, their staging site — which mirrored the live content — got indexed because it had a public-facing URL pattern. Search rankings flipped between staging and live for weeks. The fix was adding a Disallow: / directive in staging's robots.txt, but by then the damage was done. I now block staging at the infrastructure level.

I treated SEO as a content-only job. Early in my career, I focused on keywords and headings, ignoring templates, dispatcher caching, and canonical configuration. That changed when I ran a [technical SEO audit](/technical-seo/) on an AEM site and found that half the pages had self-referencing canonicals pointing to the wrong URL because the template had no logic for selectors. I now audit the technical setup — templates, dispatcher rules, and URL handling — before I touch a single line of copy.

Next step

Quick answers

How do I set a canonical tag in AEM?

Open the page properties and navigate to the SEO tab. There is a field for canonical URL. I set this to the preferred version of the page, omitting selectors or parameters. For dynamic pages, I hardcode the static URL in the component or use a custom script in the template to generate it automatically.

Should I use subdomains or subpaths for multilingual AEM sites?

Subpaths are better for SEO. Google treats subdomains as separate sites, splitting authority and making hreflang management harder. I use subpaths like /en/ and /fr/ under the same root domain, and I configure hreflang tags in AEM page properties to signal the language and region variants.

Can AEM automatically generate a sitemap?

Yes. AEM has a built-in sitemap generator that lists pages based on your site structure and any exclusions you set. I enable it in the AEM instance configuration and submit the resulting XML via Search Console. The sitemap updates when you publish or unpublish pages, so it stays current with your content.

What should I do if AEM creates duplicate URLs with different parameters?

Set a canonical tag to the cleanest version of the page. Also consider using URL rewrite rules in the dispatcher to strip unnecessary parameters. If the duplicates serve different content (e.g., sort orders), use either the canonical or a noindex directive on parameter-based pages to avoid confusing search engines.

Sources

Primary documentation is linked directly. Anything commercial is marked nofollow.

Notes from Callum Bennett.