Tools & Analytics

Link Guardian: automatic link protection & history

Link Guardian shields your site graph when URLs become unstable β€” it protects internal links when posts are drafted, trashed, or deleted, restores them when safe to republish (with Auto-Restore on Publish enabled), and keeps an auditable Protection History timeline. Pair it with Link Reports and scans so you separate β€œlifecycle” removals from classic broken destinations.

Guide #29 9 min read Administrator Utilities tab

Before you start

Link Guardian listens for editorial lifecycle events inside WordPress. When enabled, Remove Links on Draft, Remove Links on Trash, or permanent deletion paths can rewrite inbound anchors so sister posts stop pointing at content that temporarily (or permanently) left the published web. That is complementary to crawler-based Broken Links lists in Link Reports, which flag HTTP-level failures after a scan.

Where this lives in wp-admin Open SEO Rank Genius β†’ Tools & Analytics, expand the Utilities group (same menu cluster as URL Medic), and switch to tab=link-guardian. Keyboard bookmark: admin.php?page=seo-link-genius_tools&tab=link-guardian.
  • Requires admin access. Toggling Guardian, saving Protection Settings, and restoring rows from history are privileged operations.
  • Understand the KPI meanings. Total Protected, Pending Restore, Restored, and Failed summarise what the database tracked β€” Failed is Guardian processing issues, not the same metric as outbound β€œ404” URLs in reports.
  • Broken links? After Guardian stabilizes internal navigation, sweep structural 404s with Link Management scans plus Redirects / 404 / URL Medic utilities.

Enable Guardian

Flip the master control in the Link Guardian header when you are ready for automatic rewriting. Turning it off hides the KPI row and nested panels instantly in the UI so operators can troubleshoot without stray AJAX writes.

…/admin.php?page=seo-link-genius_tools&tab=link-guardian
SEO Rank Genius β€Ί Tools & Analytics β€Ί Utilities
URL Medic URL Redirects 404 Monitor Link Guardian Activity Log
πŸ›‘

Link Guardian

Protects internal links when posts are drafted, trashed, or deleted

Enabled
Total Protected
128
Pending Restore
9
Restored
41
Failed
2
How to read the row Total removals logged, restores still waiting on an editor decision, confirmed successful restores, and Guardian operations that surfaced in the Failed column with a logged reason inside history.

Master toggle beside the shield header plus the four KPI counters that mirror Total Protected, Pending Restore, Restored, and Failed.

Republish playbook Keep Auto-Restore on Publish checked when drafts are short-lived staging states. When a post transitions back to Published, inbound links rebuild automatically whenever Guardian already removed them.

Protection Settings

Within the Protection Settings panel you decide which WordPress statuses trigger surrogate removals:

  1. Remove Links on Draft β€” strip inbound links when an editor demotes a post to draft so live articles no longer point at inaccessible permalinks.
  2. Remove Links on Trash β€” extend the same behavior to trashed posts (still recoverable from the trash screen).
  3. Auto-Restore on Publish β€” reinsert anchors automatically after the destination returns to Published status.
Protection Settings β€’ Link Guardian
SEO Rank Genius β€Ί Tools & Analytics

πŸ•’ Protection Settings

Toggles autosave independently via AJAX β€” each row maps to a stored option key in slg_options.

Remove Links on Draft Auto-remove inbound links when a post is changed to draft
Remove Links on Trash Auto-remove inbound links when a post is trashed
Auto-Restore on Publish Restore removed links when a post is republished

Each descriptive row matches wp-admin strings: Remove Links on Draft, Remove Links on Trash, and Auto-Restore on Publish (mock toggles use srg-mock-tog).

Permanent deletes When editors empty trash permanently, anchors may remain removed even if Guardian previously logged a pending restore row. Decide whether to run manual Restore commands from history before the deletion finalizes.

Protection History timeline

Protection History renders a timeline keyed to lifecycle actions. Filter chips (All, Pending, Restored, Permanent, Failed) narrow the backlog; each row shows whether the inbound link was removed because of draft, trash, or delete workflows, timestamps in human-readable form, and optional anchor excerpts.

Protection History timeline
SEO Rank Genius β€Ί Utilities β€Ί Link Guardian

Protection History

All Pending Restored Permanent Failed
✏

Link removed from Spring pricing guide (target: Legacy promo LP)

πŸ• 2 hours ago Draft Pending
Anchor: β€œcompare plans”
Restore
πŸ—‘

Link removed from Case study roundup (target: Retired SKU page)

πŸ• 1 day ago Trash Restored

Draft and Trash icon wells mirror wp-admin Dashicon treatments; statuses echo the badges rendered beside each timeline row.

Manual Restore Pending rows expose a Restore action so approvers can reinsert a link before the destination is republished β€” useful when marketing revives a landing page without toggling draft states twice.

Guardian focuses on editorial risk (draft/trash/delete). Classic broken-link detection still depends on the crawl index:

  • Run scheduled or on-demand scans from Link Management so fresh HTTP statuses flow into Link Reports β†’ Broken Links.
  • Use Redirects, 404 Monitor, and URL Medic to chain permanent fixes once you confirm the destination should never return.
  • Compare Guardian’s Failed KPI against report tables β€” if Guardian cannot rewrite content (permissions, malformed HTML, etc.), the history row’s Reason field explains the failure while Link Reports still lists raw 404 pairs.
Link Reports β€’ Broken Links table (illustrative)
SEO Rank Genius β€Ί Tools & Analytics β€Ί Link Reports
Broken LinksAfter scan
Source postBroken URLLast status
Pillar Β· SEO checklist/old-ebook/404
News Β· Product drophttps://partner.biz/missing410
FAQ Β· Billing/wp-content/uploads/old.pdf403
Guardian versus Broken Links Clearing a row here means the destination responds again on the crawler; Guardian meanwhile prevents internal links from pointing at drafts/trash independently of HTTP status polling.

Link Reports aggregates scanner output β€” reconcile those URLs with redirects while Guardian quietly maintains safe internal citations during lifecycle churn.

Operational splitUse Guardian when editors constantly flip publish states on campaigns; use crawler reports when migrating domains or cleaning legacy outbound URLs.
Teaching editorsExplain that Trash + Pending Restore means the link text was pulled but can return automatically via Auto-Restore on Publish.
AuditsScreenshot KPI deltas weekly; spikes in Pending Restore reveal workflow bottlenecks, not crawler noise.
Redirects firstFor true 404 URLs, normalize with URL Medic before expecting Guardian to silently repair external partner links.

Troubleshooting

KPI counters stay frozen after bulk edits

Reload the Utilities tab β€” stats query the persistence layer on render. Also confirm no optimisation plugin is stripping admin-ajax responses for slg_toggle_link_guardian.

History shows Failed with a Reason line

Open the offending post in the Classic/Block editor, ensure the anchor still exists somewhere Guardian can traverse, then retry from the Pending queue. Conflicting page builders occasionally wrap anchors in markup Guardian cannot hydrate.

Auto-Restore on Publish did nothing

Verify the setting stayed enabled (blue toggle). If the target was permanently deleted instead of drafted, Guardian may mark the record Permanent β€” manual content fixes or new links are required.

Broken Links table still lists URLs Guardian β€œshould” remove

Guardian works on internal editorial states; a URL can still 404 if the server misroutes it. Fix the HTTP layer via URL Medic & redirects, then rescan.