Skip to main content

HTML Guide

Bad value X for attribute “href” on element “a”: Invalid host: Illegal character in domain: space is not allowed.

An href attribute on an a element contains an invalid URL that has space characters in the domain.

The domain in a URL cannot contain space characters, for example the following are invalid:

<a href="http://my domain.com">link</a>
<a href="http://my%20domain.com">link</a>

Related W3C validator issues