How to Fix URL Whitespace Characters

How to Fix URL Whitespace Characters

Free Complete Site Audit

Access a full website audit with over 300 technical insights.

Something went wrong. Please, try again later.
Trusted by
Sitechecker trusted company

Free Website SEO Checker & Audit Tool

  • Scan the site for 300+ technical issues
  • Monitor your site health 24/7
  • Track website rankings in any geo

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.

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.

Fast Links

You may also like

View More Posts
How to fix Page and SERP titles that don't match
Site Audit Issues
How to fix Page and SERP titles that don't match
Iryna Krutko
Jun 21, 2023
What if no Keywords are Found in the Page Title?
Site Audit Issues
What if no Keywords are Found in the Page Title?
Ivan Palii
Jun 21, 2023
How to fix the issue when page has link with a URL referencing a local or UNC file path
Site Audit Issues
How to fix the issue when page has link with a URL referencing a local or UNC file path
Ivan Palii
Oct 31, 2022
close