Published: May 13, 2021 Updated: Sep 3, 2026

Links Counter Free Tool


Enter a URL



About Links Counter

What This Tool Actually Does

The Links Counter on limitlessreferrals.info answers one narrow question about a webpage. How many hyperlinks exist in the raw HTML source of that page, once you remove duplicates and sort every link into one of three buckets. The answer arrives as a single row of numbers. Total Links, Internal Links, External Links. That's the whole output.

You type a URL into the box above this article, press the button, and the tool fetches the page for you. It reads the HTML as plain text, the way a server delivers it. No images load. No JavaScript runs. No popups appear. The tool walks through the markup, finds every anchor tag with an href attribute, and starts counting.

The count is deduplicated. If the same href appears ten times in the page source, it counts once. If two different hrefs point to the same final destination through a redirect, they count as two, because the tool compares strings. If a page links to itself in the navigation menu and again in the footer with the exact same address, that's one link. The tool does not ask what a human would consider a link. It asks what the HTML source contains.

Three numbers come back. The total is simply how many unique, non-empty hrefs survived the filtering. The internal number is how many of those point back to the same site. The external number is how many point somewhere else. Some links fit neither bucket, and those only add to the total. A mailto link, a javascript link, or a relative path without a leading slash all fall into that third, invisible category.

The tool makes one request, to one URL, and shows one row. There is no history, no export, no chart. You get the answer and a button that says Try New URL.

How to Use This Tool

  1. Open the tool page. Find the input box above this article, on the Links Counter page itself.
  2. Type a full domain or page address. You can enter example.com or https://example.com/page, and the browser will add http:// if you leave it off.
  3. Make sure the address contains a dot. The form refuses input without one, so a bare localhost name won't go through.
  4. Press the submit button. The page reloads and sends the URL to the tool's output handler.
  5. Read the single result row. Look for Page URL, Total Links, Internal Links, and External Links.
  6. Check for blank cells. If the fetch failed, the row appears with empty count cells, and you should try another URL or use the Link Analyzer instead.

The whole interaction takes a few seconds. There is no account, no queue, no CAPTCHA, and no per-tool request cap. A site-wide throttle applies to every page on limitlessreferrals.info, so if you fire more than roughly fifteen requests within a single second from one address, that address gets blocked for the rest of the day. Normal use, a handful of URLs spread over minutes, never comes close to that limit.

What the Three Numbers Mean

The tool classifies every collected href into internal, external, or neither. The classification rules come straight from the code, and they are simpler than most people expect.

A link counts as internal when its host matches the page's host, with or without the www prefix. If you check http://example.com, then a link to http://www.example.com/page counts as internal. A link to http://example.com/other also counts as internal. A link that starts with a single slash, like /products or /blog/post, counts as internal too, because the browser would resolve it against the current host. The tool treats that as same-site.

A link counts as external when it names a different host or when it starts with a double slash. The double-slash form, also called a protocol-relative URL, looks like //other-site.com/path. Since the tool always fetches over plain http, it resolves that link against the http scheme. A different host means external.

Everything else falls into a third bucket that the tool does not display. Mailto links, javascript links, and relative paths without a leading slash, such as about.html or ../contact, are neither internal nor external. They add to the total count but appear in no column of their own. The sum of internal plus external will therefore often be smaller than the total, and that gap is the unclassified set.

Link form Example Classification
Same host, with or without www http://example.com/about Internal
Starts with one slash /products Internal
Different host http://other-site.com External
Starts with two slashes //cdn.example.net/lib.js External
Mailto or javascript mailto:info@example.com Neither
Relative, no leading slash about.html Neither

The tool classifies by string shape. A relative link that resolves to the same site still counts as neither, because the rule demands a leading slash. A link to a subdomain like blog.example.com counts as external, because the host string differs. These rules are mechanical, and they produce consistent results across every URL you check.

How the Fetch Works

The tool begins with whatever you typed. It trims whitespace, lowercases the whole string, and strips off an http:// or https:// prefix if one is present. It keeps the www part. Then it prepends http://, always plain http, even if you typed https. The address http://example.com stays as is. The address https://example.com becomes http://example.com before any request goes out.

That forcing matters more than it looks. Many modern sites answer http requests with a redirect to https, and the tool's fetch layer follows redirects only to the extent that PHP's defaults allow. When the redirect chain fails, the fetch fails, and you get blank cells. The tool never retries over https. It never upgrades the scheme. It made one attempt over plain http, and that attempt either worked or it didn't.

The validation step checks the URL after normalization. If the result does not look like a valid site address, the tool returns the message Input Site is not valid! and stops. The browser-side check for a dot catches the obvious cases, and the server-side validation catches the rest.

The actual fetch uses PHP's file_get_contents function, pulling the entire page into memory through the Simple HTML DOM library. No user agent header is sent. That detail decides the fate of many checks. A large share of public websites, including major ones, respond to a request with no user agent by sending a forbidden status. The request fails, and the tool shows its blank row.

There is no browser rendering step. The tool never executes JavaScript, never waits for fonts, never loads images, never runs a single line of embedded script. It reads the HTML source as delivered by the server and parses the anchor tags from that source. If a page builds its navigation menu in JavaScript, the tool sees none of those links. If a page hides content behind a click handler, the tool never clicks. The source is the whole story.

The fetch also has a timeout inherited from PHP defaults, roughly thirty seconds in typical configurations. The entire page must download within that window. A slow page, a huge page, or a server that trickles bytes can time out. When that happens, no error message appears. The table simply shows empty cells.

The Live Tests Behind This Description

The facts for this rewrite come from a live test run on September 4, 2026, executed against the tool's real output handler. Two URLs were checked, and the results were recorded exactly as the tool returned them.

The first test used http://example.com. That page is maintained by the Internet Assigned Numbers Authority and contains a single link to its own documentation page at iana.org. The tool returned Total 1, Internal 0, External 1. The single link points to a different host, so it classifies as external. The math is trivial, and the result confirms that the tool counts real anchor tags in real fetched HTML.

The second test used http://www.wikipedia.org. The tool returned a table row with all three count cells blank. No total, no internal, no external. A hand request from the same server confirmed the cause. Wikipedia answered the user-agent-less request with a forbidden status, and the tool's fetch failed. The tool did not show an error banner. It did not explain the failure. It just left the cells empty.

Test URL Total Links Internal Links External Links
http://example.com 1 0 1
http://www.wikipedia.org blank blank blank

The blank row is the tool's answer to a fetch it cannot complete. It cannot fetch the page, so it reports no numbers. That behaviour follows directly from fetching without a user agent. Many sites will refuse the request. Some of the most visited sites on the internet are among them. If you check a major homepage and see blanks, the page likely rejected the request.

Correcting the Old Description of This Tool

The previous version of this page described the tool in ways that do not match its actual behaviour. This section corrects those claims, point by point, based on the code and the live tests.

The old copy said the tool scans a web page and counts every hyperlink it finds in the rendered HTML. The tool does no rendering. It fetches raw HTML over plain http and parses that source. Rendered HTML implies a browser engine, JavaScript execution, and a complete page after scripts run. None of that happens. The tool sees the source bytes, nothing more. JavaScript-built menus are invisible to it. Client-side rendered single-page applications will show far fewer links than a browser displays.

The old copy suggested a split between dofollow and nofollow attributes. The tool computes a nofollow count internally, but its output table does not show it. You will never see a dofollow or nofollow column on this page. The related Link Analyzer tool displays per-link attributes, and that is where you should look if you need that data. This tool shows three columns only.

The old FAQ answered the question of why the link count differs from a manual scroll by implying that JavaScript menus were counted. They are not. The difference comes from the opposite direction. The tool counts fewer links than you see, because it ignores everything the browser builds after loading. It also counts links you might not notice, because hidden anchors in the source still register.

The old copy mentioned that you cannot check a page that requires login, which is true, but it omitted the larger problem. Many public, login-free sites return blank counts because they refuse user-agent-less requests. Wikipedia is the documented example. The old description gave no hint that blank cells were a possible outcome. This rewrite states it clearly.

The old copy never mentioned the http:// forcing. If you type an https address, the tool downgrades it to http before fetching. That decision can break the check for any site that only serves https. The old description treated the fetch as if it simply retrieved whatever you typed.

Why the Count Differs From a Browser View

Open a page in Chrome or Firefox and scroll through it. Count the links you see with your eyes. Then run the same URL through this tool. The numbers will rarely match, and the gap can go in either direction.

The browser shows you the rendered page. It fetches the HTML, parses it, executes every script, waits for asynchronous content, and repaints the document as changes arrive. A modern site might load its navigation from a JavaScript file, pull article links from an API, or swap content based on viewport size. All of those links exist in the browser's document model but not in the original HTML source. This tool never sees them.

The reverse gap also exists. The HTML source can contain links that no human ever sees. Hidden navigation, links styled off-screen, or duplicate entries in a sitemap-style footer all appear in the source. The tool counts them. A manual scroll misses them.

The deduplication rule adds another difference. A browser does not deduplicate anything. If a page lists the same link in the header, the sidebar, and the footer, the browser has three anchor elements, and a human counting by eye sees three. This tool collapses them into one. The total will therefore often be lower than a naive count of visible anchors.

The classification rule also differs from intuition. A human looking at a page about example.com might consider a link to blog.example.com as part of the same site. The tool calls it external, because the host string differs. A human might consider a relative link like products.html as internal. The tool calls it neither, because it lacks the leading slash. These are mechanical decisions, and they follow the code.

Factor Browser view Links Counter
JavaScript-built links Counted after execution Never seen
Duplicate hrefs Counted each time Counted once
Hidden source links Not visible Counted
Relative link about.html Treated as same-page Unclassified
Subdomain link blog.example.com Often seen as same site External

Use this tool when you want to know what the raw HTML source contains. Use a browser extension or the Link Analyzer when you want to know what a visitor actually sees and can click.

Internal vs External vs Neither

The boundary between internal and external is a single comparison. The tool takes the host of the page you checked and the host of each link, and asks whether they match. A match means internal. A mismatch means external. The www prefix is ignored for this comparison, so www.example.com and example.com count as the same host.

The leading-slash rule handles the rest of the internal bucket. An href of /pricing has no host at all. The tool resolves it against the current page, decides it belongs to the same site, and counts it as internal. This is the standard behaviour of a browser too. A relative URL without a scheme and without a leading slash would also resolve against the current page in a browser, but the tool's rule does not classify it. The distinction is a code choice, and it means the internal count can understate the true number of same-site links on pages that use bare relative paths.

External links include every href that names another host. The double-slash form, //other-site.com, gets the external label because it points at a different host once resolved. The tool does not care whether the external site is a trusted partner, a CDN, a social network, or a spam domain. Different host means external.

The neither bucket is where the tool's simplicity shows. Mailto links open an email client. Javascript links run code. Bare relative paths resolve against the current directory. None of those carry a host that the tool can compare, and none start with a slash. The tool therefore leaves them unclassified. They still count toward the total, which is why the sum of internal and external can be less than the total.

A page with twenty unique hrefs might show Total 20, Internal 12, External 6. The missing two are mailto links or bare relative paths. A page with no unclassified links will show internal plus external equaling the total exactly. That arithmetic gives you a quick check of whether the page uses clean, absolute-style linking or a mix of odd href forms.

What the Tool Does Not Count

The list of exclusions is long, and knowing it prevents confusion. The tool counts only anchor tags with an href attribute. It does not count image links wrapped in map areas. It does not count the href of a link tag for stylesheets, canonical URLs, or alternate language versions. Those live in the HTML head and are not anchors.

The tool ignores href values that are empty or that consist of a single hash. A link to the top of the page, written as href="#", is dropped. A link with no href attribute at all is dropped.

JavaScript-generated links are absent by definition. The tool never runs a script. If a page loads its entire content through fetch calls and builds anchors after the fact, the tool sees an empty or near-empty body and reports accordingly. Single-page application frameworks like React or Angular produce pages where this matters enormously.

The tool also does not follow redirects to count the final destination. It counts the href string as written. A shortened URL like bit.ly/example counts as one external link, and the tool never resolves it to the destination. A redirecting link on the same page counts once, whatever chain it leads to.

Excluded item Reason
href="#" or empty href Filtered out
Stylesheet link tags Not an anchor
Canonical and alternate links Not an anchor
JavaScript-built anchors No script execution
Image map areas Not an anchor
Redirect destinations Only the href string counts

The total is therefore a count of unique, non-empty, non-hash anchor hrefs in the raw fetched HTML. Nothing more. For a full per-link breakdown, including the anchor text and the rel attribute for each individual link, the Link Analyzer on this site is the right choice.

The Blank Cells Failure Mode

This tool fails silently. When the fetch does not succeed, the output page still renders. It shows the normal table structure with the Page URL filled in. The three count cells are simply empty. No error message, no red banner, no explanation.

The live test against www.wikipedia.org demonstrated this exactly. The server returned a forbidden response to the user-agent-less request. The tool had no page content to parse, so it produced no counts. The table appeared with blank cells, and a visitor who did not know the background might assume Wikipedia had zero links.

The causes of failure are several. A site that refuses requests without a user agent will block the tool. A site that redirects from http to https in a way that PHP's default fetch cannot follow will block it. A site that times out, that takes longer than the roughly thirty-second PHP default, will block it. A site that requires cookies, that checks the Referer header, or that uses a JavaScript challenge will block it. Any of these produces the same blank row.

There is no retry logic. The tool does not try again with a user agent. It does not try again over https. It does not wait longer. It made one request with one configuration, and when that request failed, it reported nothing.

When you see blank cells, the correct response is to try another URL or to switch to a tool that fetches like a browser. The Link Analyzer on this site lists every link with its nofollow flag, so use it when you need the per-link detail. For the Links Counter itself, a blank row is the final answer.

Limitations

This tool has limits, and they follow directly from its design. It fetches over plain http only. The https address you type gets downgraded before the request. Any site that serves exclusively over https, which includes most of the modern web, may fail or redirect into a loop that the tool cannot follow.

The tool sends no user agent. That single decision excludes a large fraction of public websites. Wikipedia is the documented example, and many corporate sites, government portals, and content platforms use the same policy. They refuse any client that does not identify itself. The tool cannot check those pages.

The tool counts hrefs, not visible anchors. The number you get describes the source code, not the user experience. Pages with JavaScript navigation will report far fewer links than a visitor sees. Pages with hidden links will report more.

The deduplication is by exact string. The same page linked as /about and /about/ counts twice, because the strings differ. An identical href repeated a hundred times counts once. The tool does not normalize trailing slashes, does not strip tracking parameters, and does not resolve redirects. Two links that lead to the same final page can count as two.

Relative links without a leading slash are not classified. They add to the total but appear in neither the internal nor the external column. This can make the internal count look low on sites that use relative paths throughout.

The tool shows no nofollow or dofollow split, despite what the old page claimed. The nofollow count is computed internally but never displayed. If you need that data, the Link Analyzer shows it per link.

The whole page must download within the PHP default timeout. Large pages, slow servers, and streaming responses can exceed that window. When they do, the fetch fails and the cells go blank.

There is no CAPTCHA and no tool-specific request cap. A site-wide throttle blocks any address that sends more than fifteen requests in one second, for the rest of that day. Normal use never approaches that threshold.

Limitation Consequence
Plain http only https-only sites fail
No user agent Forbidden responses common
No JavaScript Script-built links absent
Exact string dedupe Trailing slash counts twice
No relative path classification Internal count understated
No nofollow display That data lives in Link Analyzer

These limits are part of the design. The tool answers one question cheaply and quickly, and it fails cleanly when the question cannot be answered.

When to Use the Link Analyzer Instead

The Links Counter gives you three numbers. Sometimes you need more. The Link Analyzer on this site lists every link individually, with its anchor text, its destination, and its attributes. That tool answers questions this one cannot.

Use the Link Analyzer when you need to audit a page's outbound links one by one. A broken link report, a check for suspicious destinations, or a review of which links carry nofollow all require per-link data. The Links Counter tells you that a page has forty external links. The Link Analyzer tells you which forty.

Use the Link Analyzer when the Links Counter returns blank cells. The Analyzer fetches with different mechanics and can often retrieve pages that refuse a user-agent-less request. If Wikipedia blanks out here, try the Analyzer.

Use the Links Counter when you want a fast, repeatable, three-number summary. It is the right tool for a quick sanity check, for comparing two pages at a glance, or for confirming that a page has any links at all. The speed and simplicity are the point.

Related Tools

For a per-link breakdown with anchor text and attributes, use the Link Analyzer when the three-number summary is not enough detail.

To find links that point to dead pages, use the Broken Links Checker after you have a list of URLs to test.

To measure the balance of visible text against HTML markup on a page, use the Code to Text Ratio Checker alongside the link counts.

Frequently Asked Questions

Why does the count differ from what I see in my browser?

The tool reads raw HTML source, while your browser shows a rendered page. JavaScript-built menus, dynamically loaded content, and client-side frameworks add links after the source arrives. The tool never executes scripts, so it misses those. It also deduplicates identical hrefs, which a manual count does not.

What does a blank result mean?

A blank result means the fetch failed. The tool made one request over plain http with no user agent, and the server refused it, redirected it into a dead end, or timed out. No error message appears, just empty cells. Try another URL or use the Link Analyzer, which fetches differently.

Does this tool count nofollow links?

The tool counts every qualifying href regardless of its rel attribute. A nofollow link is counted in the total, internal, or external column like any other. The tool computes a separate nofollow count internally, but it does not display it. Use the Link Analyzer to see nofollow attributes per link.

Why is the internal plus external count less than the total?

Some links fit neither bucket. Mailto links, javascript links, and relative paths without a leading slash, such as about.html, add to the total but appear in no column. When internal plus external equals the total, the page uses no unclassified href forms.

Can I check a page that requires login?

You can submit the URL, but the tool cannot log in, so it counts whatever public HTML the server returns, usually the login page itself. The tool does not handle sessions, cookies, or authentication of any kind.

Does the tool work on https websites?

The tool forces every address to plain http before fetching. If you type an https URL, it strips the scheme and prepends http. Many modern sites redirect http to https or refuse plain-http requests entirely, which leads to blank results. The tool never retries over https.


Free Software