Tarantula SEO journal

Link Rotation Systems for SEO: WordPress, JavaScript and AI Agents

A link rotation system decides which destination a link points to and when that choice changes. A URL rotator, also called a link rotator, sends clicks from one shared URL to different destinations. In backlink rotation, the link on the source page can change, or the same backlink can move between source pages. To replace a backlink on a WordPress site you control, update the anchor and destination on the source page. To split visits from a link already printed on a flyer, keep the public URL and rotate its redirect destination.

WordPress REST can save a new link in the published content. JavaScript loaded by the site can update the link in the rendered page. An AI agent can use the Model Context Protocol (MCP) to inspect placements, propose a change and call an authorized publishing tool. The useful question is which version a reader or crawler can actually observe.

Job What stays stable What changes How to verify it
Split traffic across offers The public link and the source page’s href The redirect’s Location Record the first HTTP hop, final URL and conversion by assigned variant.
Refresh an editorial placement The source page and the placement’s ID The saved destination, anchor text or both Compare the exact anchor in the original HTML before and after the update.
Swap a CTA in the browser The fallback anchor in the initial response The rendered anchor and destination Inspect the rendered DOM and click the link. Disable JavaScript and check the fallback.

Backlink rotation was a popular link-building tactic in Poland in the late 2000s and early 2010s. GotLink and e-Weblink were prominent examples of rotating link exchanges, called systemy wymiany linków (SWLs) in Polish. Members hosted links to each other’s sites, and the exchange moved those links among participating pages over time. A campaign could keep the same destination while the pages linking to it changed. Google’s account of link exchanges in Poland and Silesia SEM’s comparison of rotating link exchanges.

Eight PBN sites surround a money page. Two backlinks originate from a different pair at each step. In alternating steps, one link points to another PBN. Both links are shown as HTML anchors.
A different pair of PBNs supplies the two links at each step. Link A always points to the money page. Link B alternates between the money page and another PBN. The <a href="…">anchor text</a> shows the destination and visible text of each link.

For an editorial link, start with the source paragraph. Does it still promise the right thing? A page that says “compare wholesale suppliers” should lead to a comparison. If the new URL is a supplier’s quote form, rewrite the surrounding sentence so it describes the next step accurately. Follow the same rule when you change the anchor alone. See how to match PBN anchor text to the page it links to.

URL Rotators for Weighted and Round-Robin Redirects

For traffic rotation, use a temporary server-side redirect, such as HTTP 302, from a dedicated campaign URL. A weighted split gives variants different probabilities. A round-robin sends successive requests in order. For an A/B test, keep returning visitors in the same variant where appropriate and track downstream conversions. Configure the cache so one response does not pin the destination for everyone. Preserve the campaign parameters you intend to pass through, and define a fallback for an unavailable offer. Google’s redirect guidance and Linkly’s URL rotator documentation.

Use this route when the new link should appear in the HTML served by WordPress across visits. For a post-body placement, retrieve GET /wp-json/wp/v2/posts/{id}?context=edit with an authorized account. Identify the exact block or placement marker in the editable content. Update it with POST /wp-json/wp/v2/posts/{id} and the revised content field. If a template, custom field or page builder owns the link, update that storage through its supported interface. WordPress Posts API.

Placement IDs, Cache and Rollback

  1. Read the current placement. Save its ID, source URL, editable value, expected destination and the revision or version your workflow records. Preview a diff limited to the agreed placement.
  2. Apply the change. Use a service identity with permission for the relevant content. WordPress supports Application Passwords over HTTPS for authenticated requests. If several workers or editors can change the same placement, enforce the expected version in a server-side conditional write or serialize all writers through the same editing lock. WordPress REST authentication.
  3. Verify the public response. Invalidate the relevant caches and fetch the live article. Check the source URL, expected link text, exact href and rel on the placement. Follow the destination separately. Restore the previous placement only if the current version still matches the version you wrote.

For PBN link rotation, a persistent edit makes it easier to retire an outdated target, move a placement to a replacement offer, or restore a useful resource across the sites where readers still need it. Keep a relevant working link in place when the ledger has no concrete reason to change it.

Load a script through your own WordPress plugin or theme when a slot needs a runtime change, such as a temporary CTA. Use a real fallback link in the HTML and identify the slot with a data attribute. Load the script after the markup, for example via wp_enqueue_script(), and pass it an approved configuration. Here’s a simplified example for an owned site.

<a data-placement="supplier-guide" href="/suppliers/">
  Compare wholesale suppliers
</a>
<script>
  const link = document.querySelector('a[data-placement="supplier-guide"]');
  if (link) link.href = "/suppliers/revised/";
</script>

This swap assumes the new page still delivers the comparison promised by the anchor. The script updates the DOM without rewriting the original response. If it fails to load, the published fallback remains usable. Keep any required link qualification on the element and verify it survives the update.

Google documents that dynamically inserted links can be crawlable when they use a real <a href>. Some bots lack JavaScript support. Rendered markup can be inspected without clicking. A button that assigns window.location only after a click is an interaction and should be checked as one. If search discovery matters, put the intended link in the server-generated HTML and confirm which version is served. WordPress script loading, Google’s link guidance and Google’s rendering guidance.

An agent is useful when the decision needs context. It can read the source paragraph, check whether the target still answers the question and propose an edit for review. A scheduler is enough for a fixed expiry with a preapproved replacement. Use MCP when the agent needs a consistent way to call tools across publications.

For example, let the agent call get_placement and propose_placement_change. Give the publishing tool a separate contract. It accepts a site and placement ID, an expected version, an approved destination ID and the proposed anchor. The backend resolves those IDs, checks authorization and allowed fields, then saves through WordPress or changes the redirect configuration. The WordPress MCP Adapter exposes registered WordPress abilities to MCP clients. A custom MCP server can also wrap your own REST integration. Both require you to provide the placement tools and enforce their permissions. MCP server tools.

Version Checks and Change Logs

Keep the saved state explicit. The agent can flag that a deal has expired, suggest a passage update and prepare the old and new link for review. Record the actor, reason, before and after values, timestamp and public verification result. Put the same operation ID on retries. If the stored version has changed since the proposal, stop that write and review the new state. This prevents an old proposal from silently undoing a newer edit when the backend enforces the version check.

Use one row per placement change. An example row for an editorial link could record the source /guide/, slot supplier-guide, previous target /suppliers/, replacement /suppliers/revised/, and the reason “updated supplier comparison.” Keep the old target in the record so you can restore it. For a redirect, add the approved destination set, traffic weights and fallback. A single click will only tell you which destination was selected on that request.

Check What it establishes What to record
Original HTML What a fetch of the source actually contains Anchor, href, rel, timestamp and response version if available
Rendered DOM What the selected browser session sees after scripts run Rendered anchor, visible text, final href and behavior with JavaScript disabled
First HTTP hop Whether the system rerouted a request Requested URL, status and Location, then final URL after following
Search-engine fetch That the source was fetched again when verified in logs Crawler, timestamp and response variant when available
Campaign outcome What happened to the target or offer Visits and conversions by variant, or target impressions and clicks over time

In a local HTML and HTTP test, Firefox produced these results for the same placement marker:

Test setup Link in the HTTP response Link after Firefox loaded the page URL reached on click
HTML served with the new target /suppliers/revised/ /suppliers/revised/ /suppliers/revised/
JavaScript swap /suppliers/ /suppliers/revised/ /suppliers/revised/
Same script with execution disabled /suppliers/ /suppliers/ /suppliers/
Campaign redirect /campaign/ /campaign/ /suppliers/revised/ via HTTP 302

To repeat the check on your site, read the response with View Source or an HTTP client, inspect the same marker in the browser’s Elements panel, then open the link with the network log visible. Track search-engine fetches separately through the indexing workflow for a PBN source page.

If you paid for a placement, make its term, edit rights and attributes part of that record. Keep the disclosure and link qualification when you rotate a paid destination. Google treats buying links for ranking purposes as link spam and asks publishers to mark paid links with rel="sponsored" or nofollow. Rotation gives you operational control over the placement. The effect on search visibility is a separate outcome to measure. Google’s link spam policy and outbound link attributes.

Rotate when something about the placement changes: the offer ends, the target moves, the destination stops answering the source paragraph, or an agreed placement term expires. For a controlled test, record the change date and keep a set of comparable placements stable. Inspect source recrawls and target performance separately. A review cadence can help you spot broken links without automatically replacing useful ones.