Skip to content
StaticScope
Overview
Get StaticScope

SEO plugins with a static build

What Yoast, Rank Math and SEOPress bake into the HTML, what their sitemaps need, and what to verify after publishing.

Plugins Updated 21 November 2026 5 min read

SEO plugins mostly print tags into the page. They hook into wp_head and print titles, meta tags, canonicals and schema. The crawler saves the finished HTML, so most of that work survives the move to files without any special handling.

The exceptions are the parts that answer a request: sitemaps, robots.txt, redirects and 404 handling. Those need a closer look, because a static host serves files and does not run the plugin.

What is baked into the HTML

OutputIn the buildWhat to know
Title and meta descriptionYesPrinted by the plugin at render time. Check a page with a custom title, as well as the home page.
Canonical linkYesThe WordPress address is rewritten to the published address. A canonical on another domain is not, unless that host is listed under Other addresses to change.
Robots metaYesIncluding a noindex. That is useful for a staging copy and disastrous if it was left on for production.
Open Graph and Twitter tagsYesImage URLs are discovered and copied when they are on this site.
Schema and JSON-LDYesGenerated server-side. Validate the published page, not the WordPress one.
BreadcrumbsYesMarkup and schema are part of the page. Links point at static pages.
hreflangYesEach alternate points at a URL. Those URLs need files behind them, which is a multilingual question.
SitemapsCopied, then trimmedStaticScope removes entries whose pages are not in the build, and removes sitemaps left empty.
RedirectsNoThe plugin’s redirect module answers in PHP. Recreate the rules at the host.

Titles, meta and canonicals

Titles and descriptions need no work. They are in the HTML when the page is crawled. Canonicals need one check: the plugin usually builds them from home_url(), and StaticScope replaces the WordPress site address with the address on the publishing screen. That covers plain, protocol-relative, escaped and encoded forms of the same URL.

What it does not cover is a canonical pointing somewhere else. A multilingual plugin using a separate domain per language, a CDN hostname, or a staging address that is not the WordPress site URL will survive the rewrite. If you use separate domains, add them under Other addresses to change, or check each canonical by hand.

The same applies to a canonical that includes a query string. Static files have no query string. A canonical of /product/?variant=red points at a page that cannot exist as a file, even when the product page itself is fine.

Schema

JSON-LD is printed into the page, so it is copied. What changes is the context. A schema graph may include the site URL, a search action, a logo, author URLs and breadcrumb URLs. The site URL is rewritten. The rest is only correct if those files exist.

A common one is the SearchAction that points at /?s={search_term_string}. On a static host that URL returns the 404 page, so the schema advertises something the site cannot do. If you use Pagefind, point the search action at the search page, or remove it. Validate the published page with a rich results test rather than trusting the WordPress preview.

Sitemaps

Each plugin has its own address. Yoast and Rank Math normally serve /sitemap_index.xml. SEOPress normally serves /sitemap.xml. WordPress itself serves /wp-sitemap.xml. StaticScope reads robots.txt first and follows the sitemaps it names, then tries those usual names. It copies the sitemap files and the pages they list.

After the crawl, it opens every sitemap in the build and removes entries whose files are not there. A sitemap left with no entries is deleted, and its parent index is updated. Finally, robots.txt is pointed at the sitemaps that exist. This is the part that stops Search Console reporting a list of 404s after you exclude author archives or a custom post type.

Two kinds of entry are left alone. An entry with a query string or a fragment is kept, because it cannot be matched to a file reliably. An entry on another host is kept, because it is not this site’s to remove. Check those by hand if you use image sitemaps, news sitemaps or a separate CDN domain.

The plugin’s sitemap is still the authority on what should be listed. StaticScope only removes what is missing. If the plugin lists a page that exists but is noindex, it stays listed. Fix that in the plugin’s settings, not in the build.

robots.txt, noindex and redirects

robots.txt is copied like any other file. If WordPress is installed in a folder, it may not serve one at all, so StaticScope writes the version WordPress would serve at the root of a domain. It then rewrites the Sitemap: lines to the sitemaps in the build.

Watch the noindex setting. If Search engine visibility is switched off in WordPress, or the SEO plugin has a staging noindex enabled, the tag is baked into every page and the site check reports that search engines are being turned away. That is the right behaviour for staging and the wrong one for production. The GitHub add-on adds its own noindex to environments that are not live, which is a better place for it.

Redirects are the one part of an SEO plugin that never survives. Yoast Premium’s redirects, Rank Math’s redirections and SEOPress’s redirects are stored rules answered in PHP. If an old URL is crawled and the rule fires, the crawler follows it and saves the destination content at the old address. That keeps the link working but creates a duplicate page rather than a 301. If the old URL is never crawled, it is a 404. Either way, the fix is a host rule.

What to verify

  1. View source on the home page, a post, an archive and a page with a custom title. Check the title, description, canonical and robots meta.
  2. Confirm the canonical host is the published host, not WordPress, localhost or a staging domain.
  3. Run a rich results test on one page of each schema type. Check the URLs inside the schema resolve.
  4. Fetch each sitemap listed in robots.txt. Every entry should return 200.
  5. Fetch robots.txt and read the Sitemap: lines. They should name files that exist.
  6. Search the built HTML for the WordPress host and for noindex. The site check already flags the first.
  7. Test one old URL from each redirect rule against the published site with curl -I.
curl -s https://example.com/about/ | grep -E '<title>|canonical|application/ld\+json'
curl -I https://example.com/sitemap_index.xml
curl -s https://example.com/robots.txt

Next