Actions

Actions define what modifications the gateway applies when a rule's conditions match. Every SEO change is an action.

Actions are the "what" part of a rule. When a rule's conditions match, the gateway executes all configured actions against the HTML response before returning it to the visitor.

A single rule can have multiple actions — for example, setting a canonical tag and injecting JSON-LD structured data in a single rule.


Meta Tags

set_meta_robots

Sets or replaces the <meta name="robots"> tag in the page <head>.

When to use: Control crawler indexing behavior for specific pages or URL patterns.

ParameterValue
contente.g. noindex, nofollow, noindex, nofollow, index, follow
<!-- Result -->
<meta name="robots" content="noindex, nofollow">

Common values:

  • noindex — tell all crawlers not to index this page
  • noindex, nofollow — don't index and don't follow links
  • index, follow — explicitly allow indexing (overrides a previous noindex from origin)

set_meta_title

Sets or replaces the <title> element.

When to use: Override page titles without touching the CMS or codebase — useful for A/B testing titles or fixing titles across a template.

ParameterValue
contentThe title string

set_meta_description

Sets or replaces the <meta name="description"> tag.

When to use: Add or fix meta descriptions on pages where the CMS doesn't provide them.

ParameterValue
contentThe description string

set_meta_tag

Sets any arbitrary <meta> tag by name. If a tag with the same name attribute already exists, it's replaced.

When to use: Add custom meta tags not covered by the specific actions above.

ParameterValue
nameThe name attribute (e.g. author, theme-color)
contentThe content attribute value

remove_meta_tag

Removes a <meta> tag by its name attribute.

When to use: Strip meta tags injected by your CMS that shouldn't appear on certain pages.

ParameterValue
nameThe name attribute to remove

set_canonical

Sets or replaces the <link rel="canonical"> tag.

When to use: Fix canonical tags across filtered/sorted/paginated URLs, or consolidate duplicate content.

ParameterValue
hrefThe canonical URL
<!-- Result -->
<link rel="canonical" href="https://www.example.com/products/blue-widget">

Problems it solves:

  • E-commerce sites with faceted navigation (color, size filters) generating thousands of near-duplicate URLs
  • CMS platforms that set incorrect canonicals on paginated pages
  • Syndicated content that needs to point back to the original

add_hreflang

Adds a <link rel="alternate" hreflang="..."> tag for international SEO.

When to use: Implement or fix hreflang across a localized site without modifying every page template.

ParameterValue
langBCP 47 language tag (e.g. en, de, en-US, x-default)
hrefThe URL of the alternate page for this language
<!-- Result -->
<link rel="alternate" hreflang="en-US" href="https://www.example.com/en-us/page">

Create multiple add_hreflang actions within a single rule to build a complete hreflang set.


remove_hreflang

Removes all <link rel="alternate" hreflang="..."> tags, or a specific one by language.

When to use: Strip incorrect hreflang tags injected by your platform before adding corrected ones.

ParameterValue
langLanguage tag to remove, or * to remove all

HTTP Headers

set_response_header

Adds or replaces an HTTP response header.

When to use: Add security headers, cache-control directives, or custom headers without server config changes.

ParameterValue
nameHeader name
valueHeader value

Examples:

X-Robots-Tag: noindex          ← prevents indexing via header (useful for non-HTML)
Cache-Control: max-age=3600    ← set caching behavior for CDN/browser
X-Content-Type-Options: nosniff

remove_response_header

Removes an HTTP response header.

When to use: Strip headers that expose server information or conflict with your intended behavior.

ParameterValue
nameHeader name to remove

Examples: Remove X-Powered-By, Server, or platform-specific headers.


Structured Data

auto_schema

Template-based Schema.org JSON-LD injection. The gateway controls @context and @type automatically — you supply only the type name and properties. If a JSON-LD block with the same @type already exists on the page, it is replaced rather than duplicated.

When to use: Add structured data across many pages without writing raw JSON-LD. Use inject_json_ld when you need full control over the schema object; use auto_schema when you want the gateway to handle the boilerplate.

ParameterValue
schemaTypeSchema.org type name (e.g. Article, Product, FAQPage, BreadcrumbList)
schemaProps object — the gateway merges these with @context and @type; any user-supplied @context or @type keys are ignored

Template Variables

Any {variable} in a string value is resolved at request time. Variables work in nested objects and arrays.

VariableResolves to
{page_title}Current <title> text (reflects any prior set_meta_title action in the same rule)
{page_description}<meta name="description"> content
{page_image}<meta property="og:image"> content
{domain}Domain name (e.g. www.example.com)
{scheme}Protocol (https or http)
{path}URL path (e.g. /products/blue-widget)
{full_url}Full request URL
{query}Query string (without ?)

You can also define custom domain variables that work alongside system variables. See Domain Variables for details.

Structural Builders

FAQPage and BreadcrumbList accept simplified input shapes that the gateway transforms into the correct schema structure.

FAQPage — provide a questions array with question/answer pairs. The gateway expands these into the required mainEntity array of Question/Answer types.

{
  "schemaType": "FAQPage",
  "schema": {
    "questions": [
      { "question": "What is SerpWise?", "answer": "The edge proxy for the Agentic Web — purpose-built for SEO and GEO." },
      { "question": "Is it no-code?", "answer": "Yes." }
    ]
  }
}

BreadcrumbList — provide an items array with name/url pairs. The gateway builds itemListElement with auto-incrementing position values.

{
  "schemaType": "BreadcrumbList",
  "schema": {
    "items": [
      { "name": "Home", "url": "https://www.example.com/" },
      { "name": "Products", "url": "https://www.example.com/products/" },
      { "name": "Blue Widget", "url": "{full_url}" }
    ]
  }
}

Examples

Article with template variables:

{
  "schemaType": "Article",
  "schema": {
    "headline": "{page_title}",
    "description": "{page_description}",
    "image": "{page_image}",
    "url": "{full_url}",
    "publisher": {
      "@type": "Organization",
      "name": "Acme Corp",
      "url": "https://{domain}"
    }
  }
}

FAQPage:

{
  "schemaType": "FAQPage",
  "schema": {
    "questions": [
      { "question": "How does SerpWise work?", "answer": "It sits between your CDN and origin." }
    ]
  }
}

BreadcrumbList:

{
  "schemaType": "BreadcrumbList",
  "schema": {
    "items": [
      { "name": "Home", "url": "https://{domain}/" },
      { "name": "Blog", "url": "https://{domain}/blog/" }
    ]
  }
}

Result:

<script type="application/ld+json">
{"@context":"https://schema.org","@type":"Article","headline":"My Article Title",...}
</script>

inject_json_ld

Injects a JSON-LD <script> block into the page <head>.

When to use: Add Schema.org structured data (Product, Article, BreadcrumbList, Organization, FAQ, etc.) to pages where your CMS doesn't support it.

ParameterValue
schemaA valid JSON-LD object
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Blue Widget",
  "description": "A high-quality blue widget",
  "brand": {
    "@type": "Brand",
    "name": "Acme Corp"
  }
}

Multiple inject_json_ld actions can be used in the same rule — each generates a separate <script type="application/ld+json"> block.


modify_json_ld

Modifies an existing JSON-LD block already present in the page. Targets a specific @type and merges or overwrites specific properties.

When to use: Augment JSON-LD that your CMS already outputs — add missing properties without replacing the entire schema block.

ParameterValue
typeThe @type to target (e.g. Product, Article)
propertiesKey-value pairs to merge into the matched schema

HTML Injection

inject_html

Injects an arbitrary HTML snippet at a specific position in the document.

When to use: Add scripts, tracking pixels, banners, or any custom HTML without a code deployment.

ParameterValue
positionWhere to inject: head_start, head_end, body_start, body_end
htmlThe HTML string to inject
PositionWhere it goes
head_startImmediately after <head>
head_endImmediately before </head>
body_startImmediately after <body>
body_endImmediately before </body>

Example — inject a tracking pixel before </body>:

<img src="https://analytics.example.com/pixel.gif" width="1" height="1" alt="">

remove_element

Removes all HTML elements matching a CSS selector from the document.

When to use: Strip elements injected by your CMS or theme that shouldn't appear on certain pages — for example, removing social share buttons from noindex pages, or stripping duplicate schema blocks.

ParameterValue
selectorA valid CSS selector

Examples:

.social-share-buttons    ← remove by class
#cookie-banner           ← remove by ID
script[src*="analytics"] ← remove analytics scripts on specific pages
meta[name="generator"]   ← remove CMS fingerprinting meta tags

Find & Replace

find_and_replace

Performs text substitution across the entire HTML response body.

When to use: Fix repeated text patterns across pages — update old brand names, fix broken URLs in content, replace deprecated phrases, or rewrite specific strings that your CMS outputs incorrectly.

Problems it solves:

  • A brand rename where old name appears across thousands of pages
  • An incorrect URL pattern embedded in CMS templates
  • Deprecated rel attributes or aria labels in template markup
ParameterValue
searchThe text or regex pattern to find
replaceThe replacement string
isRegextrue to treat search as a regex pattern; false for literal text
caseSensitivetrue or false (default: true)

Literal text example:

Find:    Acme Widget Co.
Replace: Acme Corporation

Regex example with capture group:

Find:    href="http://old-domain\.com(/[^"]*)"
Replace: href="https://www.new-domain.com$1"
Regex:   true

Find & replace operates on the raw HTML string, not the parsed DOM. Be precise with your patterns to avoid unintended substitutions. Always test with the URL Simulator first.


Conversion Tracking

fire_conversion_event

Fires a server-side conversion event to connected tracking platforms (Meta CAPI, TikTok Events API, Google Ads Enhanced Conversions).

When to use: Track purchases, leads, add-to-cart, and other conversion events server-side — bypassing ad blockers and Safari ITP.

ParameterValue
event_typepurchase, add_to_cart, lead, page_view, initiate_checkout, add_payment_info, search, view_content, complete_registration, contact, subscribe, custom
extractionConfiguration for extracting event data (value, currency, order ID) from the HTML response

Events are sent to all active integrations configured for the domain. A first-party cookie is set on the visitor to enable cross-session attribution.


Robots.txt

modify_robots_txt

Modifies the robots.txt response served by your domain.

When to use: Add, update, or replace robots.txt directives without server access — useful when your CMS generates an incorrect robots.txt.

ParameterValue
modeappend — adds to existing content; replace — replaces entirely; generate — creates from scratch if absent
contentThe robots.txt content to apply

This action only fires when the request path is exactly /robots.txt and the response content type is text/plain.

On this page