Sub topic 1
Why Links Matter and What These Two Tactics Target
Prerequisites
This chapter assumes you already know the following:
- What a backlink is (a link from another site to yours) and what anchor text is (the clickable words of a link).
- How an HTML anchor tag (
<a href="...">) works and how a URL is built. - What common HTTP status codes mean: 200 (OK), 301 (moved permanently) and 404 (not found).
- How to open an SEO tool export, such as a CSV of backlinks, and read its columns.
If any of these are unfamiliar, review them first. Later chapters build on them directly.
Why links matter
Search engines find pages by following links, and they use links as one signal of which pages deserve trust. A link from page A to page B works as a vote: someone chose to point readers at B. Links do not decide rankings alone, but they remain one of the stronger inputs, and they also send referral traffic.
Three properties decide how much a single link is worth:
- Relevance. A link from a page about web analytics to your analytics guide says more than a link from an unrelated page.
- Authority. A link from a site that is itself well linked and trusted carries more weight than one from a new, obscure site. SEO tools estimate this with proprietary scores. Treat those scores as rough guides, not facts.
- Placement. A link inside the main body of an article, surrounded by related text, is worth more than one in a footer, sidebar or site-wide template.
A link that scores well on all three is called an editorially placed link. Someone chose to include it because it helps readers. That is the kind of link both tactics in this tutorial aim to earn.
The problem with asking for links
Most outreach for links is cold and generic, and most site owners ignore it. The reason is simple: the owner gains nothing. Both tactics here change that by starting from something that already exists on the owner's page.
- Broken link building starts from a defect. A page links out to a resource that no longer works. You tell the owner and offer a working replacement.
- Unlinked mention reclamation starts from intent. A page already names your brand, product or people but does not link. You ask for a link so readers can find you.
In both cases the request is small, specific and fixes something on the owner's page.
Tactic one: broken link building
A broken link is an outbound link whose target no longer returns usable content. The usual signs are a 404 or 410 status, a server error, or a failed connection. Later chapters cover redirects and soft 404s, which are pages that return 200 but show an error message.
The workflow has five steps:
- Find relevant pages that link out to resources on your topic.
- Check each outbound link and list the ones that are broken.
- Work out what the dead page covered, often with a web archive.
- Match the topic with an existing page of yours, or create one.
- Email the owner with the exact broken link and your suggested replacement.
The following script covers step 2. It fetches a page, resolves every outbound link and reports the broken ones. It tries a HEAD request first, which asks for headers only, and falls back to GET when a server rejects HEAD.
import requests
from urllib.parse import urljoin, urlparse
from bs4 import BeautifulSoup
HEADERS = {"User-Agent": "link-audit/1.0"}
def find_broken_links(page_url, timeout=10):
html = requests.get(page_url, headers=HEADERS, timeout=timeout).text
soup = BeautifulSoup(html, "html.parser")
broken = []
seen = set()
for a in soup.find_all("a", href=True):
url = urljoin(page_url, a["href"])
if urlparse(url).scheme not in ("http", "https") or url in seen:
continue
seen.add(url)
try:
resp = requests.head(url, headers=HEADERS, allow_redirects=True, timeout=timeout)
if resp.status_code in (403, 405, 501):
resp = requests.get(url, headers=HEADERS, stream=True, timeout=timeout)
resp.close()
status = resp.status_code
except requests.RequestException:
status = None
if status is None or status in (404, 410) or status >= 500:
broken.append((url, status))
return broken
if __name__ == "__main__":
for url, status in find_broken_links("https://example.com/resources"):
print(status, url)Note the design choices. The script skips mailto: and other non-HTTP links, checks each URL once, and reports None when a connection fails. A 500-level error may be temporary, so recheck anything it flags before you write to anyone.
Tactic two: unlinked brand mentions
An unlinked mention is a page that names your brand but contains no link to your site. Mentions often convert well because the writer already knows you, already chose to write about you, and only needs to add an anchor. The ask is a favor of seconds, not a request to feature you.
The workflow also has five steps:
- Discover pages that name your brand, using search operators, alerts or mention tools.
- Verify that each page truly lacks a link to your domain.
- Qualify the pages by relevance, authority and placement.
- Email the author with the exact sentence and the page you suggest linking to.
- Track whether the link appears.
Search operators handle step 1. The first query below finds pages that name the brand outside its own properties. The second narrows to pages that also mention a founder. The third finds resource pages that may hold outbound links worth checking for breakage.
"Acme Analytics" -site:acme-analytics.com -site:linkedin.com -site:facebook.com
"Acme Analytics" "founder" -site:acme-analytics.com
intitle:resources "web analytics" inurl:linksStep 2 needs code, because a page can name you and link to you at the same time. The function below returns True only when the text names the brand and no anchor points to the brand's domain.
import re
from urllib.parse import urlparse
from bs4 import BeautifulSoup
def is_unlinked_mention(html, brand, domain):
soup = BeautifulSoup(html, "html.parser")
domain = domain.lower()
for a in soup.find_all("a", href=True):
host = urlparse(a["href"]).netloc.lower()
if host == domain or host.endswith("." + domain):
return False
text = soup.get_text(" ")
pattern = r"\b" + re.escape(brand) + r"\b"
return re.search(pattern, text, re.IGNORECASE) is not None
html = "<p>We tested Acme Analytics last month.</p>"
print(is_unlinked_mention(html, "Acme Analytics", "acme-analytics.com"))The sample prints True. One limit: the function checks only absolute links. A relative link such as /about on your own site is not an issue here, but a link that goes through a redirect domain would be missed. Later chapters refine this check.
How the two tactics compare
| Aspect | Broken link building | Unlinked mentions |
|---|---|---|
| Starting point | A dead outbound link | A page naming your brand |
| What you offer | A working replacement page | A link to a page the writer already referenced |
| Content needed | Often a new or matched resource | Usually none |
| Typical reply rate | Lower, since the owner owes you nothing | Higher, since the owner already knows the brand |
| Main risk | A weak match between your page and the dead one | Pestering people who linked elsewhere on purpose |
What outreach looks like
The outreach message names the exact problem and offers a specific fix. Here is a template for the broken link case.
Subject: Quick fix for a dead link on your resources page
Hi Sam,
While reading your page on web analytics basics, I noticed the link to "Guide to Event Tracking" returns a 404 error.
We published a guide on the same topic that covers the same ground and is kept up to date: https://example.com/event-tracking-guide
If it fits, it could replace the broken link. Either way, I thought you would want to know about the error.
Thanks,
AlexIt is short, it names the broken link, and it leaves the decision to the owner. A later chapter covers follow-ups.
Limits to keep in mind
- Supply is limited. You can only act where dead links or unlinked mentions already exist.
- Owners owe you nothing, so expect many non-replies. A modest success rate is normal.
- Some links will carry attributes such as
nofollow, which affect how much value passes. The next chapter covers these. - Volume does not equal quality. A handful of relevant, well-placed links outweighs a long list of weak ones.
Exercise
A page on a university site names your product in a paragraph but does not link to you, and another page on a blog links to a dead resource about the topic you cover. Which tactic applies to each page, and what does the outreach email offer in each case?
Show answer
The university page is an unlinked mention, so the email quotes the sentence that names your product and asks the author to link it to your site. The blog page is a broken link case, so the email names the exact dead URL and offers your matching page as a replacement. In both cases the request is specific and helps the owner's readers.
Exercise
The function isunlinkedmention returns False for a page that contains the text "Acme Analytics" and one anchor pointing to https://blog.acme-analytics.com/post. Why?
Show answer
The function checks every anchor's host. The host blog.acme-analytics.com ends with ".acme-analytics.com", so it counts as a link to the brand's domain, and the mention is already linked.