Link Building

Backlink Audit with Claude Code: Toxic Links and Gaps

Run a backlink audit with Claude Code: score your link profile, flag toxic links and risky anchors, and find competitor link gaps from multiple data sources.

By Somanath Diksangi12 min read
Backlink audit with Claude Code: score a link profile, flag toxic links and find competitor gaps with /claudeseo backlinks

A backlink audit reviews every site that links to yours: how many referring domains you have, how natural your anchor text looks, which links could be spam, and which sites link to competitors but not to you. With Claude Code, the ClaudeSEO /claudeseo backlinks command runs that audit, combines every link data source you've configured, and labels each number with its source.

This guide covers what to audit, how the command works, how to run it, and how to act on the results.

Key takeaways

  • A complete backlink audit covers seven areas, from anchor text and toxic links to competitor gaps and lost links.
  • /claudeseo backlinks <url> combines up to five data sources and gives each one a confidence value.
  • The 0-100 Backlink Health Score needs data for at least four of its seven factors, or the report says INSUFFICIENT DATA.
  • Subcommands handle competitor gaps, toxic links, new and lost links, and checks that known links still exist.
  • Disavowing is a last resort. Most audits end with redirects for broken linked pages and an outreach list.

A backlink is a link from another website to yours. Search engines use links to discover pages and as one signal of trust. Two counts matter:

  • Backlinks are every individual link. One sitewide footer link can create thousands.
  • Referring domains are the distinct websites linking to you, usually the better measure of how widely you're cited.

Each link also carries signals an audit reads. Anchor text is the clickable text: "Acme Analytics" is branded, "acme.com" is a naked URL, "click here" is generic, and "best analytics software" is an exact-match keyword. Link attributes change how a link is treated: rel="sponsored" marks paid placements, rel="ugc" marks user-generated content, and rel="nofollow" covers other links a site doesn't vouch for (see Google's guide to qualifying outbound links). And source quality matters more than volume: a link from a relevant site in your market counts for far more than one from a page with thousands of outbound links.

Why audit? Because your link profile changes even when you do nothing. Sites delete pages, redesigns break URLs that earned links, and spam networks link to you. Google's spam policies treat link schemes, such as buying links or building site networks to manipulate rankings, as a violation. An audit shows whether any of that touches your site, and where your next good links could come from.

For how AI assistants mention and cite your brand, see our GEO and AI search features.

The command is part of the Claude SEO skill suite. Give it a domain or URL and Claude Code works through a fixed sequence:

Flow diagram of the backlink audit: detect data sources, set the data tier, collect link data, analyze seven sections, weight by confidence, review the report, and report priorities, with a loop to re-run after adding sources.
The backlink audit runs in a fixed order, and adding data sources with the setup subcommand gives a fuller report on the next run.
  1. Detect sources. It checks for DataForSEO, Moz, and Bing Webmaster Tools. Common Crawl and the verification crawler need no setup.
  2. Set the data tier. Tier 0 is Common Crawl plus the crawler. Tier 1 adds Moz, Tier 2 adds Bing, Tier 3 adds DataForSEO.
  3. Collect link data. Every available source runs, in a fixed order of preference.
  4. Analyze seven sections. These are covered below.
  5. Weight by confidence. Each source's confidence value feeds the health score.
  6. Review the report. A mandatory checklist runs first: every metric needs a source label, and JavaScript-rendered pages can't be reported as "link removed".
  7. Report priorities. You get the score, a table per section, prioritized issues, and link building opportunities.

With no API keys, the command still runs on Common Crawl data and suggests the setup subcommand.

Where the data comes from

SourceWhat it providesSetup neededConfidence
DataForSEOSummary, anchors, referring domains, spam scores, new and lost linksExtension and account1.0
Verification crawlerWhether known links still existNone, you supply the links0.95
Moz APIDomain Authority, Page Authority, Spam Score, anchors, top pagesAPI key0.85
Bing Webmaster ToolsInbound links, anchors, countries, two-site comparisonAPI key, verified site0.70
Common CrawlReferring domain count, PageRank, harmonic centralityNone0.50

When DataForSEO and Moz disagree, the skill trusts DataForSEO and notes the discrepancy. DataForSEO needs its own account, and its pricing applies (see using DataForSEO with Claude Code). Moz and Bing need accounts and API keys under their own terms. Common Crawl's graph is domain-level: it counts who links to you, but not which pages, with what anchors, or how authoritative they are.

Grid of the seven sections in every backlink audit: profile overview, anchor text, referring domain quality, toxic links, top pages, competitor gap, and new and lost links.
The seven sections the backlink report always includes, with toxic links getting the closest review.

1. Profile overview

The headline numbers: total backlinks, referring domains, follow ratio, how concentrated your links are, and the trend. The skill rates them against fixed bands:

MetricGoodWarningCritical
Referring domainsOver 10020 to 100Under 20
Follow ratioOver 60%40-60%Under 40%
Domain diversityNo domain over 5%One domain over 10%One domain over 25%
TrendGrowing or stableSlow declineOver 20% drop a quarter

These bands are the skill's settings, not rules from Google. A new site can land in the critical band just because it's young: read it as "needs more links", not "penalized".

2. Anchor text distribution

Natural profiles are dominated by brand names and plain URLs, because that's how people link unprompted. The skill compares your mix with these ranges:

Anchor typeTarget rangeFlag when
Branded30-50%Under 15%
Naked URL15-25%Not flagged
Generic10-20%Not flagged
Exact-match keyword3-10%Over 15%
Partial-match keyword5-15%Over 25%
Long-tail or natural5-15%Not flagged

The flag that matters most is exact-match anchors above 15%. Bulk keyword anchors are the classic footprint of links that were placed rather than earned.

3. Referring domain quality

This checks top-level domains, link countries, and the spread of authority; healthy profiles have links from every tier. The skill treats 80% or more of links from countries irrelevant to your market as a sign of a private blog network (PBN), a group of sites built to pass links.

High-risk patterns are flagged straight away:

  • Links from known private blog network domains
  • A domain whose links all use the same exact-match anchor
  • Links from penalized or deindexed domains
  • Mass directory submissions (50 or more directory links)
  • Link farms, meaning pages with more than 10,000 outbound links
  • Paid link patterns, such as footer or sidebar links on every page of a domain

Medium-risk patterns are left for you to review: unrelated niches, reciprocal links, thin pages under 100 words, and more than 50 backlinks from one domain. Spam scores come from DataForSEO or Moz.

This shows your link magnets, pages with no backlinks (candidates for better internal linking), and pages that return 404 but still have backlinks. Each of those is link equity you can reclaim with a redirect.

6. Competitor gap analysis

The gap analysis sorts linking domains into three groups. Domains that link to your competitor but not you are opportunities, domains linking to both are relationships to keep, and domains linking only to you are your advantage. Opportunities come with their domain authority.

Tracking changes over 30, 60, and 90 days needs DataForSEO. Other sources give a point-in-time snapshot, and the skill says so instead of guessing. Red flags are a sudden spike in new links (possibly negative SEO), a sudden loss of many links (removed content or a site penalty), and link growth that slows for three months or more.

Bar chart of the Backlink Health Score weights: referring domain count, domain quality, and toxic link ratio at 20 percent each, anchor text at 15, link velocity and geographic relevance at 10, and follow ratio at 5.
How the skill weights the seven factors in the 0-100 Backlink Health Score, before missing factors are redistributed.

The skill weights referring domain count, domain quality, and toxic link ratio at 20% each, anchor text naturalness at 15%, link velocity and geographic relevance at 10% each, and follow ratio at 5%. Two rules keep the score honest:

  • Confidence weighting. DataForSEO data counts at full confidence, Moz at 0.85, Bing at 0.70, and Common Crawl at 0.50. A factor with no data has its weight shared proportionally across the others.
  • The data sufficiency gate. With four or more factors scored, you get a number. With fewer, the report shows INSUFFICIENT DATA (X/7 factors scored) and lists the factor scores it has, each with source and confidence.

A low score built on thin data would look like a weak profile when the real problem is missing data. Link velocity needs DataForSEO, so without it the maximum is six factors.

Open Claude Code with ClaudeSEO installed (see our guide to installing SEO skills in Claude Code), then run:

text
/claudeseo backlinks https://www.example.com

Or ask in plain English, and Claude picks the matching skill:

text
Audit the backlink profile for example.com. Flag toxic links and any anchor text that looks over-optimized.

The subcommands focus the audit on one job:

text
/claudeseo backlinks gap https://www.example.com https://www.competitor.com
/claudeseo backlinks toxic https://www.example.com
/claudeseo backlinks new https://www.example.com
/claudeseo backlinks verify https://www.example.com --links known-links.txt
/claudeseo backlinks setup
SubcommandWhat it does
gapLists sites that link to one domain but not the other
toxicRuns toxic link detection with disavow recommendations
newReports new and lost backlinks (needs DataForSEO)
verifyChecks the links in your file still exist
setupShows how to add Moz and Bing API keys

Bing data needs a site verified in Bing Webmaster Tools (our Bing Webmaster Tools guide covers it). Moz requests are paced to respect its rate limit; if Moz cuts off mid-run, the report says the data is partial.

The full site audit can also hand backlink analysis to the same specialist agent and file its findings under a Backlink Profile category.

The report uses the same structure every time:

markdown
### Backlink Health Score: XX/100 (or INSUFFICIENT DATA)

| Section                  | Status         | Score  | Data Source           |
|--------------------------|----------------|--------|-----------------------|
| Profile Overview         | pass/warn/fail | XX/100 | [source (confidence)] |
| Anchor Distribution      | pass/warn/fail | XX/100 | [source (confidence)] |
| Referring Domain Quality | pass/warn/fail | XX/100 | [source (confidence)] |
| Toxic Links              | pass/warn/fail | XX/100 | [source (confidence)] |
| Top Pages                | info           | N/A    | [source (confidence)] |
| Link Velocity            | pass/warn/fail | XX/100 | DataForSEO only       |

### Critical Issues (fix immediately)
### High Priority (fix within 1 month)
### Medium Priority (ongoing improvement)
### Link Building Opportunities (top 10)

If the score says INSUFFICIENT DATA, the setup subcommand is the fastest route to a number. Check the Data Source column before trusting a figure: a Common Crawl count and a DataForSEO count don't measure the same thing.

  • "Not found" has three meanings. The report says whether something wasn't crawled, fell below a threshold, or hit an error.
  • JavaScript pages are marked unverifiable. If a linking page, such as a social media profile, builds its content with JavaScript, the report marks it unverifiable_js instead of claiming the link was removed.
  • Some problems belong to other commands. The skill points you to /claudeseo content <url> for E-E-A-T and /claudeseo technical <url> for crawl issues.

Then work through the priority groups in order. After any backlink analysis, the skill offers to turn the findings into a PDF with /claudeseo google report.

This is usually the quickest win: 301-redirect each 404 page that has backlinks to its closest live page. On Apache, that's one line per URL:

text
Redirect 301 /old-pricing-guide /guides/pricing
Redirect 301 /blog/2019-checklist /blog/seo-checklist

Claude Code can do the matching:

text
From the backlink report, list every 404 page that still has backlinks. For each one, find the closest live page in this repo and add a 301 redirect to our redirect config. Show me the diff before saving.

Confirm the links still exist with verify, then ask the linking site to remove them if there's someone to ask. Only then consider a disavow file. Google's guidance is that most sites never need one; it's meant for cases with many spammy or artificial links that have caused, or are likely to cause, a manual action. The file is plain UTF-8 text with one domain or URL per line (lines starting with a hash are comments), uploaded in Google Search Console:

text
domain:spam-directory.example
https://link-farm.example/page-with-our-link.html

For over-optimized anchors, stop campaigns that produce exact-match anchors and ask partners to switch to branded ones.

Turn the gap list into outreach

text
Take the link building opportunities from the backlink report. Group them by type (publications, resource pages, partners, communities) and draft a short outreach note for the top five explaining which of our pages would help their readers.

Doing it without the skill

You can run a basic review with plain Claude Code and data you already have. Google Search Console's Links report exports your top linking sites and top linking text as CSV:

text
Read the Search Console link exports in ./exports. Tell me how many referring domains I have, which domain accounts for the largest share of links, how anchor text splits between branded, naked URL, generic, and keyword anchors, and which linking domains look like directories, link farms, or unrelated sites. Output a table of domains to review.

For links you earned through outreach, check they're still live:

text
For each URL in links.txt, fetch the page and check whether it links to example.com. Report the anchor text, the rel attribute, and the HTTP status. If a page looks JavaScript-rendered, say the link couldn't be verified instead of calling it removed.

The skill adds what's tedious to rebuild each time: five combined sources, confidence labels, the toxic pattern reference, gap sorting, and the weighted score with its sufficiency gate.

  • Disavowing based on one metric. A high spam score is a reason to look, not proof of harm.
  • Mixing up backlinks and referring domains. Ten thousand links from one site is still one referring domain.
  • Calling JavaScript-rendered links "lost". If the crawler couldn't see the page, the status is unknown.
  • Auditing once. Lost links and spam waves happen between audits, so re-run on a schedule.

FAQ

A backlink audit reviews the links pointing to your site. It counts referring domains, checks anchor text and link quality, looks for spam patterns, and compares your links with competitors to find opportunities.

A toxic backlink looks like part of a link scheme rather than an editorial choice: links from private blog networks, link farms, mass directory submissions, paid sitewide footer links, or domains whose links all use one exact-match anchor. The skill flags these as high-risk and leaves borderline patterns, such as reciprocal links, for you to review.

Usually not straight away. Google's guidance is that most sites don't need to disavow. Verify the links, try to get them removed, and disavow only when you have many clearly spammy links that have caused, or are likely to cause, a manual action.

Yes, with limits. The command always works with Common Crawl and the verification crawler, but at that tier it reports INSUFFICIENT DATA instead of a score. Moz, Bing, and DataForSEO each add more data under their own terms and pricing.

How many referring domains is good?

The skill rates more than 100 referring domains as good, 20 to 100 as a warning, and fewer than 20 as critical. Treat the bands as a guide, not a target: relevance and quality matter more than the count.