Edge SEO is the practice of making technical SEO changes in a small program that runs on your content delivery network (CDN), instead of in your website's own code. The program sits between the visitor and your server. It can change the request on the way in and the response on the way out: add a redirect, set a header, or rewrite parts of the HTML.
The "edge" is the CDN's network of servers close to your visitors. Most large CDNs let you run your own code there: Akamai calls its service EdgeWorkers, Cloudflare has Workers and Fastly has Compute. Each can read and change a request or response, including the HTML, as it passes through. Teams turn to the edge when the change is small and clear, but the website itself is hard to change: an old platform, a locked-down CMS, or a release queue months long.
How an edge change reaches Google
Search engines never see where a change was made. They only see the response they get:
- Googlebot, or a visitor, requests a URL.
- The request reaches the nearest CDN server, and your edge script runs.
- The script can answer on its own (for example, with a 301 redirect) or pass the request on to your server.
- Your server sends back its normal HTML.
- The script edits the response, such as a new title, an added
hreflangheader or a fixed canonical tag, and sends it on.
To Google, the result looks exactly as if your server had sent it. That's the strength of edge SEO. It also means you check it the same way you'd check any page: in Search Console, the URL Inspection tool's live test shows the HTTP headers and HTML that Google receives.
What teams change at the edge
These changes suit the edge because they follow simple rules and don't depend on what's in your database:
- Redirects. Google prefers server-side redirects. A 301 sent from the edge is a server-side redirect as far as a crawler can tell. That helps on platforms that limit or don't support the redirects you need. See redirect.
- HTTP headers. Add
X-Robots-Tagto keep PDFs out of the index, or sendhreflangas an HTTPLinkheader. Google accepts both in headers. See hreflang. - Robots.txt. Serve a robots.txt file of your own when the platform won't let you edit it.
- Tags in the HTML head. Fix titles, meta descriptions, canonical tags or structured data across a set of pages.
Rendering JavaScript pages for crawlers at the edge is possible too, but Google calls this "dynamic rendering" a workaround and doesn't recommend it. Its advice is to fix rendering in the site itself with server-side rendering, static rendering or hydration.
When edge SEO is the right tool
Edge SEO earns its place in three situations:
- The platform can't do it. The site runs on a system you can't change, and the fix is urgent.
- You want proof first. You test a change on a set of pages at the edge, measure it, then ask developers to build it properly.
- The fix is temporary. You cover a migration or a bug until the real fix ships.
In each case, plan to move lasting changes back into the site's own code. Every edge rule is code that lives outside your main codebase.
The risks to manage
Showing crawlers something different
If your script checks the user agent and gives search engines content that visitors don't get, that's cloaking under Google's spam policies. Serve the same change to everyone. Google doesn't treat dynamic rendering as cloaking as long as the content is similar. Completely different content can be.
A second, hidden codebase
Developers working on the site can't see your edge rules. They might add a canonical tag that your script then overwrites, or change the HTML so your script's search-and-replace quietly stops matching. Write every rule down, tell the development team, and recheck affected pages after each release.
Broken pages
A rule that edits HTML can damage navigation, forms or scripts if it matches more than you meant. Test on a few URLs before you roll it out, and watch for errors afterwards.
Access and cost
Edge scripts need CDN permissions that marketing teams don't usually have, and they can add to your CDN bill. Agree on who may deploy and who owns a rule when it breaks.
Check an edge change before and after launch
- Fetch the URL with
curl -Ito see status codes and headers, and view the HTML source to see head changes. - Run URL Inspection's live test in Search Console to confirm Google gets the same thing.
- Compare with what your server sends on its own, for example from a staging copy that doesn't go through the CDN, so you know which changes come from the script.
- Keep a list of every active rule, with its purpose, its owner and the date to review it.
For the wider picture, see technical SEO and content delivery network.