· 4 min read
How to Count Internal vs External Links on a Page
Heshan Fernando
Co-founder & COO
You’re doing an SEO check on a page and want a clear picture of its link structure — how many internal links point to other pages on your own site, how many external links point elsewhere, and whether there are any stray mailto or tel links mixed in. Scrolling through a page’s rendered HTML counting links by eye is slow and genuinely unreliable once a page has more than a handful of links, especially with navigation menus and footers repeating the same links across many pages.
Internal linking is a real, low-effort SEO lever — it helps search engines discover and understand the relationship between pages on a site — but auditing it manually across even a moderately complex page is exactly the kind of counting task that’s better handled by parsing the actual HTML than eyeballing a rendered page.
What counting links on a page actually involves
Every <a> tag on a page has an href attribute, and categorizing it means checking whether that href points to the same domain (internal), a different domain (external), or a non-navigational target like a mailto: or tel: link, or an in-page anchor (#section). A proper count needs to correctly parse the actual href values, not just count visible link text, since some links (like navigation menus or footers) can repeat across many pages and inflate or skew a naive count.
Getting an accurate breakdown matters for SEO auditing specifically because internal and external links serve different purposes — internal links distribute authority and help with site structure and discoverability, while external links (especially many of them, or ones to low-quality sites) can carry different SEO implications depending on context.
Why people get stuck here
- Manually counting links on a rendered page. Scrolling through and counting visible links by eye is slow and error-prone, especially on pages with more than a handful of links.
- Repeated navigation and footer links skewing perception. A page’s actual unique content links can get lost among repeated header, footer, and sidebar links if you’re not distinguishing between them.
- Confusing anchor links with real navigation. In-page anchors (
#section) aren’t the same as internal links to other pages, and lumping them together misrepresents the actual link structure. - Missing non-standard link types.
mailto:andtel:links are technically links but serve a completely different purpose than page-to-page navigation, and conflating them with internal or external counts muddies the picture.
What a good internal link counter looks like
Parses actual HTML, not just visible text
Working from the page’s real markup, checking actual href values, produces an accurate count that a visual scan can’t reliably match.
Categorizes links clearly
Separating internal, external, and other link types (anchors, mailto, tel) into distinct groups gives a genuinely useful breakdown rather than one undifferentiated total.
Lists the actual links, not just a count
Seeing the specific URLs behind each category — not just a number — lets you spot patterns or issues (like an unexpectedly large number of external links) directly.
Common mistakes to avoid
- Counting links by scrolling through a rendered page instead of checking the actual HTML source, missing links that aren’t visually obvious.
- Treating repeated navigation or footer links the same as unique content links when assessing a page’s actual internal linking strategy.
- Lumping in-page anchor links together with real internal navigation links, muddying the picture of how pages actually connect to each other.
- Ignoring
mailto:andtel:links in a count meant to assess navigational link structure, when they serve an entirely different purpose. - Not checking whether external links are appropriately using
rel="nofollow"or similar attributes where relevant to your SEO strategy.
How to do it with Internal Link Counter
Online Tool Store’s Internal Link Counter processes your page’s HTML entirely in your browser.
- Open the Internal Link Counter tool.
- Paste the page’s HTML source.
- Review the counted and categorized internal, external, and other links.
- Use the listed links to spot patterns or issues in the page’s link structure.
Because it runs locally, you can check a page’s link structure without needing a full SEO crawling tool for a quick, single-page check.
Frequently asked questions
Why does internal linking matter for SEO?
Internal links help search engines discover and understand the relationships between pages on your site, and they can help distribute authority from well-linked pages to less-linked ones. A thoughtful internal linking structure is a low-effort, meaningful SEO practice.
Are external links bad for SEO?
Not inherently — linking out to relevant, high-quality sources can add value for readers and isn’t generally harmful to SEO. What matters more is the quality and relevance of what you’re linking to, not simply the presence of external links.
What’s the difference between an anchor link and an internal link?
An anchor link (href="#section") jumps to a section within the same page, while an internal link (href="/other-page") navigates to a different page on the same site. Both are technically links on the page, but they serve very different navigational purposes and shouldn’t be counted together when assessing site structure.
Final thought
A quick link audit reveals whether a page’s structure actually matches your intent — checking the real HTML, categorized clearly, beats trusting a visual scan of a rendered page.