top of page
  • Writer's pictureBrent Payne

Has a link with whitespace in href attribute

When a URL includes at least one outbound link containing whitespace characters at either end of the href attribute, it suggests an issue that should be addressed.


Why is this important?

Whitespace before or after the URL in an anchor tag is often an oversight from a content management system or an error during input. While web browsers typically ignore these spaces, detecting them can prove challenging.

Links with added whitespace could potentially divide the authority distributed to a URL, as search engines might interpret each modified URL as a separate destination.


What does the Optimization check?

Loud Interactive's Optimization tool is activated by any webpage hyperlink—pointing to an internal location—with extra spaces in its href attribute.


Examples that trigger this Optimization:

The following examples demonstrate situations that would activate our Optimization mechanism.


An anchor with href with leading space


An anchor with href with trailing space

<a href="https://www.yourwebsite.com ">Link Text</a>


An anchor with href with leading space using single quotes


An anchor with href with trailing space using single quotes

<a href='https://www.yourwebsite.com '>Link Text</a>


How do you resolve this issue?

Locate these anchors and revise them individually. This process might involve examining and fixing the code responsible for generating such links.

Depending on the nature of the problem, you might be able to address multiple pages simultaneously, especially if they share a common template where the flawed hyperlink resides.


How do you get more data from Sitebulb?

In the URL List, select the blue Optimization Details button to open a detailed view of the Optimization for each URL.


This will display any outbound anchor links with spaces in the href attribute, color-coded for convenience. A scrollbar will guide you to the relevant section, where you'll see each problematic link highlighted.

7 views

Recent Posts

See All

ClubReq Gets A Link (Because They Asked)

I am a mentor for Techstars and have been for over 10 years. In those ten years I have mentioned to startups to ask ANYONE and everyone that they meet to link to their site. Yet, in all those times on

Comments


bottom of page