Audisto <base> Error Checker

Detect issues with <base>

With the HTML base element, the basepath can be defined for relative links on the website. If the base element is used in the wrong way, this can lead to problems with relative links. Browsers as well as search engine robots might interpret your relative links wrong with the effect of possible 404 errors or other unexpected behaviour. The result would be a bad user experience along with issues with the search engines understanding of your website’s structure.

This hints section helps to get an overview on <base> usage on a website and shows common mistakes with using <base>.

Example: Audisto <base> Error Check with the <base> hint reports for the current crawl

Audisto <base> Error Check with the <base> hint reports for the current crawl

Here is the list of all specific hints, that are part of the <base> hints section and that can be identified with the help of the Audisto Crawler.

Table Of Content

Hints

<a> links to fragment only, but <base> points to other URL

Description

An <a> element links to a fragment only, while there is a <base> pointing to another URL. Discover all URLs that contain fragment links along with a base tag pointing to another URL.

Example

Example for http://example.com/page.html

<base href="http://example.com/page2.html">
...
<a href="#top">link</a>

Expected behaviour: Browser requests http://example.com/page.html#top Actual behaviour: Browser requests http://example.com/page2.html#top

Importance

Fragment links are relative to the URL defined in the <base> element. If the <base> element is pointing to another URL, this may lead to unexpected user experience and issues with the crawlability of the website if fragment-only links are used.

Operating Instruction

We suggest not to use a <base> element if it is possible to avoid it. We also suggest using absolute links instead of fragment only links.

<base> contains malformed or empty href

Description

A <base> tag was found, but its href attribute contains an invalid URL, or a URL that is neither HTTP nor HTTPS. The crawler falls back to the document's URL as base.

Examples

A base with an invalid protocol

<base href="htp://example.com">

A base with a white space in the domain name

<base href="http:// example.com">
Importance

The base tag defines the URL base for all relative links in the document. Using a malformed URL as base href can cause issues with crawling and accessing of relative links.

Using the base tag adds more complexity when parsing relative links. Poorly programmed crawlers might not understand the base tag at all and therefore show unexpected behaviour.

Operating Instruction

We suggest not to use the HTML base tag at all. Remove it if possible.

Note: If there are changes regarding the base tag, all relative links in the document need to be checked and probably corrected.

<base> found

Description

If a base is set in the HTML, the URL is flagged with this hint. If a base is set, all relative links are relative to the base.

Example
<base href="http://example.com/directory/">
Importance

The base tag defines the URL base for all relative links in the document. Mistakes in usage of the base tag will lead to issues with user experience and crawling when relative links are used.

In addition the usage of the base tag often results in problems for poor HTML parsers and poorly programmed robots.

Operating Instruction

We suggest not to use the base tag at all. Remove base tags if possible.

We also suggest to use absolute URLs.

<base> found more than once and differs

Description

More than one <base> directives were found with a differing href attribute value.

Examples
<base href="http://example.com/">
<base href="http://example.com/folder/">

Note: The following base directives resolve to the same URL and would therefore not trigger this hint:

Base directives on http://example.com/page.html

<base href="http://example.com/">
<base href="/">
Importance

The base tag defines the URL base for all relative links in the document. Having more than one base tag is invalid. This may result in issues with relative links, that might impact search engines and user experience on the website.

Operating Instruction

We suggest not to use the HTML base tag at all. Remove it if possible. If the base tag is removed, all relative links in the document need to be checked and probably corrected.

<base> href contains a path only

Description

The <base> tag's href attribute contains a path, not an absolute URL. While this is technically allowed, it is not supported by Internet Explorer as of version 8.

Examples

Relative path by mistake

<base href="example.com/">

Relative path on purpose

<base href="/folder/">
Importance

The base tag defines the URL base for all relative links in the document. Mistakes in usage of the base tag might lead to issues with crawling when using relative links in the document. They will also result in issues with Internet Explorer as of version 8.

Operating Instruction

We suggest not to use the HTML base tag at all. Remove it if possible.

Note: If there are changes regarding the base tag, all relative links in the document need to be checked and probably corrected.

<base> is same as URL

Description

A <base> tag was found, but points to the same URL, rendering itself useless.

Example

HTML base on http://example.com/page.html

<base href="http://example.com/page.html">
Importance

The base tag defines the URL base for relative links in a document. There is no point in using the current URL as base href as it is the same as if the base tag isn't used at all, rendering it useless.

Operating Instruction

We suggest not to use the HTML base tag at all. Remove it if possible.

Note: If the base tag is removed, all relative links in the document need to be checked and probably corrected.

<base> occurs more than once

Description

More than one <base> tag was found. The Audisto Crawler uses the first valid annotation found for link resolving. Find all URLs on the crawled site with this report, that contain more than one <base> tag.

Example
<head>
...
<base href="http://example.com/">
<base href="http://example.com/">
...
</head>
Importance

The base tag defines the URL base for all relative links in the document. Having more than one base tag is invalid. This may result in issues with relative links, that might impact search engines and user experience on the website.

Operating Instruction

We suggest not to use the HTML base tag at all. Remove it if possible. If there are changes regarding the base tag, all relative links in the document need to be checked and probably corrected.

<base> points to other URL

Description

A <base> tag was found, and points to another URL.

Example

Base on http://example.com/page.html

<base href="http://example.com/page2.html">
Importance

The base tag defines the URL base for relative links in a document. Using a base tag together with fragment only links will make those links pointing to the specific anchor on the URL of the base tag.

If this is unintended it leads to issues with user experience and crawling.

Operating Instruction

We suggest not to use the HTML base tag at all. Remove it if possible.

Note: If the base tag is removed, all relative links in the document need to be checked and probably corrected.