I wrote this with help from an AI assistant for research and editing; the checks, the script and the opinions are mine.

A page nobody links to depends on luck. Google's own SEO Starter Guide says it primarily finds pages through links from other pages it already crawled. Your homepage gets crawled. The service page you published last weekend and never linked from anywhere might not.

That's an orphan page: it exists, it returns a 200, and zero internal links point to it. The fix is boring. Finding them is the part worth automating.

Why can't Google find my new page?

Because no other page on your site points to it. Google's link best practices put the standard in one line: every page you care about should have a link from at least one other page on your site.

Orphans happen for dull reasons. Builders let you create a page without placing it anywhere. On Squarespace, pages in the Not Linked section of the Pages panel are live but sit outside the navigation, and people use that section as a drafts drawer. Ad landing pages and service pages that lost their menu spot in a redesign are the other classics.

Doesn't my sitemap already tell Google about it?

It helps, but it doesn't replace links. Google's sitemaps overview puts the linking first: if your pages are properly linked, Google can usually discover most of the site. The same page says a sitemap doesn't guarantee that every item in it gets crawled and indexed.

So a URL that's in sitemap.xml and missing from every page's HTML sends a mixed message. The sitemap says the page exists. The rest of the site says it isn't worth pointing to. That mismatch is exactly what we can detect with a few commands.

How do I check a single page by hand?

Three checks, in this order.

1. Search Console, Links report. Under Internal links, open Top linked pages and look for the URL. If it isn't there, Google hasn't seen internal links to it. The report lags behind new pages, so don't trust it alone for anything recent.

2. The sitemap. Confirm the URL is listed:

curl -s https://example.com/sitemap.xml | grep -o '<loc>[^<]*</loc>' | grep your-page-slug 

3. The pages that should link to it. Fetch the homepage, the services page and the posts closest to the topic, and count how many times the slug appears in the served HTML:

SLUG=your-page-slug for p in / /services /blog; do printf '%s ' "$p" curl -s "https://example.com$p" | grep -c "$SLUG" done 

A 0 on every line means no link. This check reads what the server actually sends, so it doesn't wait for Search Console to catch up. One caveat: if your menu is rendered by JavaScript, curl won't see those links, and neither will a crawler that doesn't run your scripts. Google says it can generally only crawl a link that is an <a> element with an href.

How do I find every orphan at once?

Compare two lists: every URL in the sitemap, and every internal URL linked from any sitemap page. Whatever is in the first list and not in the second is an orphan candidate.

#!/usr/bin/env bash # Usage: ./orphans.sh https://example.com SITE="${1%/}" HOST="${SITE#*://}" curl -s "$SITE/sitemap.xml" | grep -o '<loc>[^<]*</loc>' | sed 's/<[^>]*>//g' | sort -u > sitemap.txt : > linked.txt while read -r url; do curl -s "$url" | grep -o 'href="[^"#?]*' | sed 's/href="//' \ | sed "s#^/#$SITE/#" | grep "$HOST" | sed 's#/$##' >> linked.txt sleep 1 done < sitemap.txt sort -u linked.txt -o linked.txt sed 's#/$##' sitemap.txt | sort -u | comm -23 - linked.txt 

What it does, line by line:

  • Pulls every <loc> from the sitemap into sitemap.txt. If your sitemap is an index of other sitemaps, run it once per child sitemap.
  • Fetches each of those pages and extracts every href, dropping fragments and query strings.
  • Turns relative links (/services) into absolute ones and keeps only links to your own host.
  • Strips trailing slashes on both sides so /blog/ and /blog match.
  • Prints the sitemap URLs that never appear as a link target. comm -23 needs both inputs sorted, which is why everything goes through sort -u.

The sleep 1 is there on purpose. It's your own server, but there's no reason to hammer it.

Read the output with judgment. The homepage often shows up because it links to itself with a full URL that differs from the sitemap version. Category and tag archives may show up too. The ones to act on are the pages that sell something.

Where should the links come from?

From pages that already get attention, and from places where a reader would want the next step. This is the order I work through:

Link from Why Example anchor text
Homepage Usually the most crawled page you have Emergency plumbing in Austin
Main services page Where people compare what you offer Couples therapy for new parents
Navigation menu One click from everywhere Couples therapy
Related posts Catches readers when they want help book a couples therapy session
Contact or booking page Reassures people about to decide see what couples therapy includes

The homepage and the services page alone move a page from hidden to findable.

Does the anchor text matter?

Yes. Google uses it to understand what the target page is about, and its link guidance lists "Click here to learn more" and "Read more" as examples of text that's too generic. The test from the same document works well in code review too: read only the anchor text, out of context, and ask whether it makes sense by itself.

If the link is an image, its alt attribute becomes the anchor text. That's one more reason not to leave it empty on a linked image.

What do I do after adding the links?

Run URL Inspection in Search Console on the orphan and click Request indexing. Do the same for the page where you added the link, because Google has to recrawl that page to see the new path. Then rerun the script. An empty output is the goal.

If the page gets crawled and still doesn't show up for searches, the problem has moved from discovery to something else, and that needs a different set of checks.

How many internal links does a page need?

Google says there's no magical ideal number, and one link is the minimum it asks for. For a page that sells something, I want the homepage, the services page and at least one related post pointing at it.

Is a footer link enough?

It counts, and it beats nothing. A link inside a paragraph, with descriptive words, tells people and Google much more than one of twenty footer links.

There's no sample of mine behind this piece, so it has no numbers of mine. The Google pages cited were read on 10 November 2026. If you run the script on your own site, tell me in the comments what kind of pages came out orphaned. I'd like to know whether builders or redesigns cause more of them.

Originally published on Contento Solutions, where I write about SEO and AI visibility for service businesses.