Skip to main content
New: 190 SEO checks now available. See what's new
mediumContentBROKEN_LINK_HREF

Link has malformed or empty href — the fix

One or more links on this page have a malformed, empty, or invalid href attribute. This includes href="#", href="javascript:void(0)", or completely empty href values.

Where this fits: content in SEO

Content is what actually earns rankings: text that answers the query better than the competition. Search engines evaluate depth, originality, structure (headings), and freshness. Thin, duplicated, or poorly structured content doesn't just fail to rank — it can drag down a domain's overall quality assessment. Every content issue here is ultimately about the same question: does this page deserve to be someone's answer?

Why link has malformed or empty href hurts your rankings

Malformed links cannot pass link equity and waste crawl budget when search engines attempt to follow them. They also create poor user experience when clicked. Links with href="#" or javascript: pseudo-protocols are not crawlable by search engines, meaning any anchor text signals are lost.

This is a medium-severity issue: individually modest, but it compounds — dozens of medium issues across hundreds of pages add up to a real quality deficit in how search engines assess the site.

How to fix it

Replace malformed href values with valid URLs. If the element is not a navigation link, use a <button> element instead of an <a> tag. Ensure all links point to valid, accessible destinations.

<!-- Before -->
<a href="#">Click here</a>
<a href="javascript:void(0)">Learn more</a>

<!-- After -->
<a href="/destination-page/">Click here</a>
<button onclick="showMore()">Learn more</button>

Content best practices

  • One H1 per page that states the topic; H2/H3 in strict hierarchy underneath.
  • Cover the query completely — the best-ranking page is usually the one that ends the search session.
  • Keep paragraphs short, front-load conclusions, and use lists for anything enumerable.
  • Update cornerstone pages on a schedule; freshness compounds.
  • Delete or merge thin pages — 10 strong pages outrank 100 weak ones on the same domain.

The full library: SEO best practices, by category.

Frequently asked questions

What does "Link has malformed or empty href" mean?

One or more links on this page have a malformed, empty, or invalid href attribute. This includes href="#", href="javascript:void(0)", or completely empty href values.

Why does link has malformed or empty href matter for SEO?

Malformed links cannot pass link equity and waste crawl budget when search engines attempt to follow them. They also create poor user experience when clicked. Links with href="#" or javascript: pseudo-protocols are not crawlable by search engines, meaning any anchor text signals are lost.

How do I fix link has malformed or empty href?

Replace malformed href values with valid URLs. If the element is not a navigation link, use a <button> element instead of an <a> tag. Ensure all links point to valid, accessible destinations.

How serious is this issue?

This is a medium-severity issue: individually modest, but it compounds — dozens of medium issues across hundreds of pages add up to a real quality deficit in how search engines assess the site. It belongs to the content family of checks.

How do I find every page affected by this on my site?

Run a free Dr Urls audit: it crawls your site, detects link has malformed or empty href on every affected page, shows example URLs, and generates a ready-to-use fix task. Re-scan after fixing to verify the issue is gone.

Does your site have this issue?

A free Dr Urls audit crawls your site, finds every page affected by link has malformed or empty href, and hands you a ready-made fix task.

Check my site free

Related content guides