Deutsch

Edge SEO, also called serverless SEO, means, according to Patrick Stox, making technical SEO changes at the CDN or in an edge worker, before the response reaches users or crawlers. The origin server or CMS does not need to change. This entry covers the SEO technique. The same phrase also turns up in results about the Edge browser and edge computing products.

How does Edge SEO work?

According to Stox, an edge worker runs in a provider’s network and can modify requests and responses on the way through. Cloudflare describes Workers as a serverless platform for apps on its global network. Patrick Stox also lists Akamai EdgeWorkers, Fastly Compute, and AWS Lambda@Edge. He credits Dan Taylor with introducing the term at TechSEO Boost in 2018.

Typical uses are redirects, canonicals, hreflang, meta tags, structured data, and X-Robots-Tag headers for non-HTML files. Stox says teams use it when a platform limits template changes or the development queue is long.

CDN: edge server in front of the origin serverUsers and Googlebot request pages from the nearest edge server of the CDN. It holds the WAF and bot rules, edge functions that can change the response, and the cache. If a copy is cached, the edge server responds directly. If not, it fetches the page from the origin server. If the WAF blocks a crawler, Google recommends status code 503 or 429.UserGooglebotEdge server at the nearest locationWAF and bot ruleslet requests through or blockEdge functionschange the response (edge SEO)Cacheis a copy of the page stored?blockOrigin server(origin)cache missCache hit · the edge server responds directly, the origin is not asked.Cache miss · the edge server fetches the page from the origin and stores it.First request · the cache is still empty, the origin serves every URL at least once.Block · if the WAF blocks a crawler, Google recommends 503 or 429.
Google allows higher crawl rates for sites backed by a CDN. On the first request for a URL the cache is still empty, so the origin server delivers it. The order inside the edge server is simplified and differs between providers. Sources: Google Search Central Blog: Crawling December – CDNs and crawling (Dec 24, 2024); MDN: CDN (glossary); Cloudflare: Workers HTMLRewriter (example of edge functions).

Risks

Google lists cloaking, which means showing users and search engines different content, among its spam practices. Edge changes should therefore apply to every request and not only to crawler user agents.

Stox names further risks. A firewall rule can block Googlebot before the worker runs, a worker in the request path is a single point of failure, and a cache in front of the worker can bypass the change.

Example

This worker adds a noindex header to every response without touching the origin server:

JavaScript
export default {
  async fetch(request) {
    const res = await fetch(request);
    const out = new Response(res.body, res);
    out.headers.set('X-Robots-Tag', 'noindex');
    return out;
  }
};

Sources

  1. Edge SEO – Patrick Stox (secondary source)patrickstox.com
  2. Cloudflare Workers documentationdevelopers.cloudflare.com
  3. Spam policies for Google web search – Cloakingdevelopers.google.com

Last updated: