How to Fix URL Whitespace Characters

How to Fix URL Whitespace Characters
Fast Links

Free SEO Audit

Crawl the website for technical issues and get a prioritized to-do list with detailed guides on how to fix.

Something went wrong. Please, try again later.
Sitechecker crozdesk rating Sitechecker crowd rating Sitechecker capterra rating
Sitechecker trusted company

Encoding URLs is one of the most critical phases of web designing and development, as it allows characters to be transmitted to the internet. Since a URL is a web page address, it’s best to know what troubles you may encounter with characters, such as whitespaces. You can check out a video of Google Webmaster Central office-hours hangout with talking about issues like this.

If you want to find out what Google has to say about using spaces in your URL, you can read through this article.

When developing websites or specific pages of your site, be careful not to insert invalid characters. This applies to your URL as well. For this to happen, you need to start learning about some of the characters. In this article, we’ll focus on whitespaces.

What Does the “URL Whitespace Character” Error Mean?

In programming terms, whitespace is any character or set representing a horizontal or vertical space. When rendered, it’s not visible, but it takes up space on the page. Standard whitespace is placed in a URL instead of putting a common space in between the other characters.

Take note that whitespace characters vary among computer languages. Whitespace used in HTML is different from that in CSS.

What Triggers This Issue?

URL encoding simply doesn’t allow spaces. A space is considered unsafe and makes a URL invalid. That’s why whitespace is used instead. In URLs and even with document directories, a document that contains whitespace in their paths or names is usually used. But unlike in URLs, spaces in instances like this will automatically be encoded and result in whitespace.

How to Check the Issue

You can use various tools or test methods to check for whitespaces in strings or URLs — for example, RegEx. However, this requires coding skills since you’ll have to generate a working function or code to detect whitespace. These methods can check for characters like spaces, tabs, form feeds, and carriage returns.

For checking whitespaces in actual URLs, you can simply observe if there are characters in the path. Whitespace can be represented by + and %20 (not 20%.)

To make this process easier, use additional tools. Sitechecker can scan your website and detect all pages with whitespaces in URL.

Whitespace in URL Issue

You will be presented with all impacted pages just by clicking the issue.

Whitespace in URL Pages

Ensure crisp, clear URLs!

Think you might have whitespace characters in your link? Check it with our tool!

Something went wrong. Please, try again later.
Sitechecker rating on crozdesk Sitechecker rating on crowd Sitechecker rating on capterra

Why is This Important?

Yes, it is indeed important. Although they’re used to encode and represent spaces, they’re not recommended because they can cause issues when site users link to the URL or share it.

Moreover, these characters in URLs and addresses are considered unsafe. Although they make links readable, they’re risky in terms of SEO. Having whitespace can possibly lead to a broken link and loss of potential link equity.

How to Fix the Issue

The best way to resolve this issue is to have no spaces at all. Remove them and use allowed characters only — for instance, a hyphen or encode using + and %20 in the query-string and %20 within the rest of the URL.

Check Your Website for SEO Errors

Something went wrong. Please, try again later.