EDS Coder Open builder

SEO on AEM Edge Delivery Services: Query Index, Sitemaps, Redirects, Robots and Metadata

A practical SEO guide for AEM Edge Delivery Services: page and bulk metadata, query-index.json, automatic and multilingual sitemaps, the redirects sheet, robots.txt and noindex, and a go-live checklist.

On this page 8 sections
  1. What EDS already does for you
  2. 1. Metadata: page level and in bulk
  3. 2. The query index
  4. 3. Sitemaps
  5. 4. Redirects
  6. 5. robots.txt and noindex
  7. Go-live SEO checklist
  8. Key takeaways

Edge Delivery Services gives you a lot of SEO for free: fast pages, server-rendered content and an automatic sitemap. It also hides a few traps that only show up after launch, like a redirect that silently hides a live page, or a fragment that ends up in Google.

This guide covers the five tools you actually use (metadata, the query index, sitemaps, redirects and robots), how they connect, and a checklist for go-live.

How metadata, the index, sitemaps, redirects and robots connect

What EDS already does for you#

  • Canonical content is in the initial HTML. The page body is rendered on the server, so crawlers and LLM agents that don't run JavaScript still see the real content.
  • Header, footer and fragments are not. They're fetched and decorated in the browser. Google's second, rendering pass usually picks them up, but don't put primary content in them.
  • Preview and origin domains are hidden from search. Every response from *.aem.page and *.aem.live carries X-Robots-Tag: noindex, nofollow and a disallow-all robots.txt. Both go away automatically once traffic comes through your production CDN.
  • Speed is a ranking signal. Keeping Core Web Vitals green is the cheapest SEO work you'll ever do.

1. Metadata: page level and in bulk#

Each document can end with a Metadata block: a two-column table of key and value. It becomes <meta> tags in the <head>. Common keys are title, description, image, robots, template and theme.

For rules that apply to many pages, create a metadata sheet in the content root (metadata.xlsx in SharePoint). The first column is URL, holding a path pattern, and every other column is a property:

URL robots image
/** /media/default-share.png
/drafts/** noindex, nofollow
*/fragments/* noindex

Rules to remember:

  • The sheet is read top to bottom, so the site-wide /** row must come first.
  • The page's own Metadata block wins over the sheet.
  • A value of "" removes a tag. For example, a Canonical column set to "" on /** removes the default canonical link.
  • Preview and publish the sheet. Editing it does nothing until you publish.

2. The query index#

The query index is a JSON list of your published pages: by default at /query-index.json. It powers blog listings, search, related content and, importantly, the sitemap.

The easiest way to set one up is the Index Admin tool on aem.live. Add the properties you want and click Reindex. The built-in properties are read from the page <head>: title (from og:title), description, image (og:image), author, date (publication-date), category, tags (article:tag), robots and lastModified.

For anything else, define it with a CSS selector in helix-query.yaml (or the index configuration in the config service):

YAML
version: 1
indices:
  blog:
    include:
      - /blog/**
    target: /blog/query-index.json
    properties:
      title:
        select: head > meta[property="og:title"]
        value: attribute(el, "content")
      teaser:
        select: main > div p
        value: words(textContent(el), 0, 30)
      robots:
        select: head > meta[name="robots"]
        value: attribute(el, "content")
      lastModified:
        select: none
        value: parseTimestamp(headers["last-modified"], "ddd, DD MMM YYYY hh:mm:ss GMT")

Things that catch people out:

  • Only published pages are indexed. A page that has only been previewed won't appear, even on aem.page.
  • Selectors run on the server HTML, not the decorated DOM. Use View Page Source, not DevTools, to write them. aem up --print-index prints each page's index record locally as you browse.
  • Always index robots. The sitemap only skips noindex pages if the index has a robots column.
  • Only Google Drive and SharePoint sites can filter pages out of the index on the server (with a helix-default sheet). With other sources, filter by robots in your block instead.
  • To check one page, call https://admin.hlx.page/index/<org>/<site>/<branch>/<path>.

3. Sitemaps#

With no configuration at all, EDS serves /sitemap.xml with every published page. Set cdn.prod.host in your site configuration so the sitemap uses your real domain instead of aem.live.

For more control, add helix-sitemap.yaml (or the sitemap configuration in the config service). The most common upgrade is multilingual sitemaps with hreflang:

YAML
sitemaps:
  website:
    default: en
    lastmod: YYYY-MM-DD
    languages:
      en:
        source: /en/query-index.json
        destination: /sitemap-en.xml
        hreflang: en
      fr:
        source: /fr/query-index.json
        destination: /sitemap-fr.xml
        hreflang: fr
        alternate: /fr/{path}

Pages that share a path suffix (/en/pricing and /fr/pricing) are linked as alternates automatically, and default: en adds an x-default entry. If the French page has a different path, set a primary-language-url metadata value on it and index that property.

A single sitemap is limited to 50,000 URLs and 50 MB. Keep a sitemap-index.xml in your repository that lists each one.

4. Redirects#

Redirects live in a redirects sheet in the content root, with two columns: Source (a path) and Destination (a path or a full URL). They return a 301 and are previewable on aem.page before you publish.

Two behaviors to know:

  • A redirect beats a page. If a redirect's source matches an existing page, visitors get the redirect and the page is hidden. Delete the redirect and the page comes back, unless it was unpublished.
  • No wildcards. The sheet only does exact paths, on purpose: wildcard rules tend to create redirect loops and 301s into 404s. If you really need /old/* → /new/$1, do it at your CDN.

For a migration, the playbook is: redirect your most-visited old URLs one to one, handle simple patterns (like dropping .html) at the CDN, don't send removed pages to the home page, and after launch watch 404s in Operational Telemetry and add redirects for real traffic.

Also avoid chains. A visit to / that redirects to /en and then to /en/home pays twice, and those delays show up in field data even though lab tests skip them.

5. robots.txt and noindex#

On your production domain, EDS serves a default robots.txt that allows everything and points to /sitemap.xml. Customize it with the robots.txt editor or the config API.

The important distinction: Disallow doesn't remove a page from Google. A blocked URL can still appear in results, and Google can't see a noindex on a page it isn't allowed to crawl. To remove a page, allow crawling and set robots: noindex in its metadata (or the bulk sheet).

Fragments deserve a noindex too. The */fragments/* row in the table above keeps them out of search, the query index and the sitemap.

Go-live SEO checklist#

Markdown
- [ ] cdn.prod.host is set; sitemap.xml shows production URLs
- [ ] robots.txt on the production domain references the sitemap(s)
- [ ] Query index includes a robots column; noindex pages are absent from the sitemap
- [ ] Bulk metadata gives every page a default share image
- [ ] Fragments, nav and footer are noindex
- [ ] Top old URLs have 1:1 redirects; no chains, nothing redirected to the home page
- [ ] X-Robots-Tag is absent on the production domain
- [ ] Operational Telemetry 404 report checked in week one

Key takeaways#

  • Page metadata wins over the bulk metadata sheet; publish the sheet after every change.
  • The query index only contains published pages, uses server HTML selectors, and needs a robots column.
  • Sitemaps are automatic; set cdn.prod.host, and use helix-sitemap.yaml for hreflang.
  • Redirects are exact-path 301s that take priority over pages. Use the CDN for patterns.
  • To remove a page from search, use noindex, not Disallow.

Multilingual sites need more than hreflang. See Multi-Site and Multilingual EDS.


Sources: aem.live: Indexing · aem.live: Indexing reference · aem.live: Sitemaps · aem.live: Redirects · aem.live: Robots · aem.live: Bulk metadata · aem.live: SEO and GEO

Turn this guide into a working block

Describe a block or drop in a design. EDS Coder writes the JS, CSS and Universal Editor model, previews it live, and syncs to GitHub.

Build a block with AI →

Keep reading

All guides →