A link whose href contains stray spaces can resolve to a different, encoded, or broken URL, so trim every href to a clean value and fix the template or data entry that introduced the whitespace.
What "Has Link with Whitespace in Href" Means
This issue fires when one of your pages contains an outgoing anchor link whose href attribute holds a whitespace character: a space, tab, or line break at the start, at the end, or in the middle of the URL. In other words, the link looks something like href=" /products/widget " instead of href="/products/widget". Crawlers such as Sitebulb and Screaming Frog flag this because the whitespace is invisible in a rendered page but very real in the source code, and it can change how the URL is interpreted.
Sitebulb describes whitespace in an href as typically a CMS or user error, and notes that while browsers usually trim it, the characters are hard to spot and may cause a loss or dissipation of link equity if search engines treat the trimmed and untrimmed targets as distinct URLs. That ambiguity is exactly what you want to remove from your internal linking.
How Whitespace Breaks URLs
A URL is supposed to be a clean ASCII string. The space character is not valid inside a URL, so when whitespace survives into a request, something has to handle it, and that something is not consistent across browsers, servers, and crawlers.
Percent-encoding to %20
Most modern browsers follow the HTML living standard and auto-encode an unencoded space in a path to %20. So href="/my page" may be requested as /my%20page. If your real URL is /my-page, that encoded request does not exist on the server and returns a 404. An inner space silently rewrites the destination.
404s and inconsistent behavior
Leading or trailing whitespace is usually trimmed by the browser, but not always, and not identically everywhere. Some browsers encode the space, some strip it, and some fail to load the page. That unpredictability means a link that works in your browser can break for a search engine crawler or for a user on a different device, producing crawl errors and dead internal links you never see in casual testing.
Common Causes
Whitespace in hrefs almost never gets typed on purpose. The usual culprits are:
CMS data entry. An editor pastes a URL into a link field in WordPress or another CMS and a trailing space rides along. Visual editors and rich-text fields are especially prone to this because the stray character is invisible.
Copy and paste. Copying a URL from an email, a document, or a spreadsheet often grabs a leading or trailing space, or even a non-breaking space, that gets dropped straight into the href.
Template and code generation. A theme or plugin that concatenates a base path with a slug can introduce a space, for example '/blog/' . $slug where $slug already carries surrounding whitespace. When the link lives in a template, the same flaw repeats across every page that uses it.
How to Diagnose
Run a crawl with a tool that reports this hint directly. Sitebulb triggers on any internal URL containing an outgoing anchor with whitespace in the href and highlights the offending link in red in the HTML view. Screaming Frog surfaces related URL and link issues, including URLs that contain a space. Both let you export the full list of affected pages so you can see whether the problem is isolated or template-wide.
For a quick manual check, open the page source (not the rendered DOM, which may already be normalized) and search the raw HTML for href=" with a space after the quote, or inspect the specific anchor the audit flagged. If the same broken link pattern appears on dozens of URLs, you are looking at a template issue rather than a one-off editing slip.
How to Fix It
The fix is to make every href a clean URL with no whitespace anywhere. For hand-authored links, edit the href and delete the stray characters. For links generated by code or a CMS field, trim the value at the source so the fix holds for every page at once.
<!-- Bad: leading, trailing, and inner whitespace -->
<a href=" /products/widget ">Widget</a>
<a href="/my page">My Page</a>
<?php echo '<a href="/blog/' . $slug . '">'; // $slug = " spring-sale " ?><!-- Good: trimmed, hyphenated, clean URLs -->
<a href="/products/widget">Widget</a>
<a href="/my-page">My Page</a>
<?php echo '<a href="/blog/' . trim($slug) . '">'; ?>Where a space belongs in a path, use a hyphen in the actual URL instead, and if a query parameter must hold a space, encode it as %20 deliberately. In templates, apply trim() to any slug or URL variable before it is printed. After deploying, re-crawl to confirm the hint clears.
Common Mistakes
Relying on the browser to clean up the URL is the biggest trap. Auto-encoding is forgiving for users but does not help a crawler that treats /my%20page as a separate, often non-existent, URL. Another mistake is fixing only the visible instances an editor remembers while ignoring the template that generates the link, which leaves the issue alive across the site. Finally, do not confuse this with the related "URL contains a space" hint: this one is about the href value on linking pages, so the repair belongs in the links and the code that builds them.
A: It can. If a search engine treats the whitespace or encoded version as a distinct URL, link equity may be split or lost, and the encoded request can resolve to a 404. Even when browsers trim it, crawlers may not behave identically, so the safe move is a clean href.
A: Crawl the site with Sitebulb or Screaming Frog and export the flagged links. Sitebulb highlights the offending href in red in the HTML, which makes it fast to spot whether the issue is a one-off edit or a template repeated on many pages.
A: Only if the space is meant to be part of the path or parameter, which is rare. For normal page URLs, use a hyphen as the word separator and remove the whitespace entirely. Reserve deliberate %20 encoding for the uncommon case where a literal space truly belongs in the value.
Need a full technical audit?
SEO ProCheck runs deep crawls that catch issues like this across your whole site.
Claude Vincent is a technical SEO consultant focused on crawlability, rendering, and AI-search visibility. He writes the field guides and case studies at SEO ProCheck, with a bias toward the durable, unglamorous work that decides whether search engines and AI answer engines can actually read and cite a site.
About SEO ProCheck
Technical SEO consulting and GEO strategy with 20 years of enterprise experience. Case studies, resources, and tools for search and AI visibility.
Work With Me
Technical SEO audits, GEO strategy, site migrations, and international SEO. Hourly consulting for teams who need hands-on support, not just reports.








