HTML Guides for domain
Learn how to identify and fix common HTML validation errors flagged by the W3C Validator — so your pages are standards-compliant and render correctly across every browser. Also check our Accessibility Guides.
The host in this link's URL has a label longer than 63 bytes, which is more than DNS allows for a single label.
A domain name such as docs.example.com is made of labels separated by dots: docs, example and com. RFC 1035 limits each label to 63 bytes, and the validator checks this limit when it parses the host of the URL. DNS can't resolve a host with a longer label, so the link leads nowhere.
The limit applies to the ASCII form of the label. Internationalized domain names are converted to Punycode (xn--...) before the check, and that encoding takes more bytes than the original characters, so a label with non-ASCII letters can go over the limit even when it looks shorter.
Real domains almost never have labels this long. The error usually comes from a missing slash between the domain and the path, which glues the path onto the top-level domain, or from a template that puts an ID or token where a subdomain should go. Paths and query strings have no per-segment limit like this, so moving the long part out of the host fixes the URL.
The validator reports a host that is too long as a whole (more than 255 bytes) with a different message.
Invalid example
The slash after example.com is missing, so the whole path becomes part of the last label:
<a href="https://example.comguides-to-writing-valid-html-for-accessible-websites-and-apps">Read the guide</a>
A long token used as a subdomain has the same problem:
<a href="https://5f2b8c1e9a7d4e6b8c3f1a2d9e7b5c4a6e8f1b3d5a7c9e2f4b6d8a1c3e5f7b9d.cdn.example.com/logo.png">Logo</a>
Valid example
Put the slash back, or move the token into the path:
<a href="https://example.com/guides-to-writing-valid-html-for-accessible-websites-and-apps">Read the guide</a>
<a href="https://cdn.example.com/5f2b8c1e9a7d4e6b8c3f1a2d9e7b5c4a6e8f1b3d5a7c9e2f4b6d8a1c3e5f7b9d/logo.png">Logo</a>
URLs must conform to the URL Living Standard, which forbids tab characters (U+0009) within the host/domain portion of a URL. While some browsers may silently strip tabs and still navigate to the intended destination, this behavior is not guaranteed and should not be relied upon.
This issue typically arises from one of the following scenarios:
- Copy-paste errors: Copying a URL from a document, email, or spreadsheet that inadvertently includes tab characters.
- Template or build tool formatting: A templating engine or code generator inserting whitespace (including tabs) into a URL string, especially when the URL is constructed across multiple lines.
- Manual typos: Accidentally pressing the Tab key while editing an
hrefvalue, particularly in editors that don't visualize whitespace.
Tab characters are invisible in most code editors by default, which makes this error frustrating to track down. Enabling "show whitespace" or "show invisible characters" in your editor can help you spot the offending character.
Why this matters
- Standards compliance: The HTML specification requires that
hrefvalues contain valid URLs. A tab in the domain makes the URL syntactically invalid. - Accessibility: Screen readers and assistive technologies parse
hrefvalues to announce link destinations. An invalid URL can lead to confusing or broken announcements. - Reliability: While major browsers tend to be forgiving and strip tabs before resolving URLs, some HTTP clients, crawlers, or older browsers may not. This can cause broken links in unexpected contexts like RSS readers, email clients, or web scrapers.
How to fix it
- Enable visible whitespace in your editor to locate tab characters.
- Search for tab characters in your
hrefvalues. In many editors, you can use a regex search for\twithin attribute values. - Remove the tab characters so the URL is a clean, continuous string with no embedded whitespace.
- If URLs are dynamically generated, inspect the code that builds them to ensure no tabs or other whitespace are concatenated into the domain.
Examples
❌ Incorrect: Tab character in the domain
In the example below, a tab character is embedded within the domain name (represented here as 	 for visibility, though in source code it would be an actual invisible tab):
<!-- The tab between "example" and ".com" causes the error -->
<a href="https://example .com/page">Visit Example</a>
Note: The tab character between example and .com is invisible in most editors but triggers the validation error.
✅ Correct: Clean URL with no whitespace
<a href="https://example.com/page">Visit Example</a>
❌ Incorrect: Tab introduced by multi-line URL construction in a template
This can happen when a URL is broken across lines in a template and tabs are used for indentation:
<a href="https://
example.com/page">Visit Example</a>
✅ Correct: URL on a single line with no embedded whitespace
<a href="https://example.com/page">Visit Example</a>
Tip: Finding hidden tabs
If you're having trouble locating the tab character, try pasting your href value into a tool that reveals character codes, or run a quick check in your browser's developer console:
// Check for tabs in a URL string
const url = document.querySelector('a').getAttribute('href');
console.log(url.includes('\t')); // true if a tab is present
console.log(JSON.stringify(url)); // shows \t explicitly in the output
Validate at scale.
Ship accessible websites, faster.
Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.
1K Weekly
1,000 monthly checks. Cancel anytime.
Get 1K Weekly →Join teams across 40+ countries