# HTTP resource not retrievable. The HTTP status from the remote server was: 400.

> Canonical HTML version: https://rocketvalidator.com/html-validation/http-resource-not-retrievable-the-http-status-from-the-remote-server-was-400
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

A resource referenced in the HTML cannot be fetched because the server returned an HTTP 400 (Bad Request) status code.

This error appears when the W3C validator tries to retrieve a URL specified in your HTML and the remote server rejects the request. The validator follows URLs found in attributes like `src`, `href`, or `action` to check that referenced resources exist and are accessible. A 400 response means the server considered the request malformed or invalid.

Common causes include:

- A typo or malformed URL in an attribute value
- Unencoded special characters in the URL (spaces, angle brackets, curly braces)
- A URL that contains template placeholders like `{{variable}}` or `{id}` that were never replaced with actual values
- A URL pointing to a localhost or internal resource the validator cannot reach
- A URL scheme mismatch, such as using `http://` when the server only accepts `https://`

The validator reports this as an informational warning rather than a strict HTML syntax error, but it signals that something about the URL is wrong or unreachable.

## Example with the issue

```html
<img src="https://example.com/images/photo one.jpg" alt="A photo">

<link rel="stylesheet" href="https://example.com/styles/main.css?v={{version}}">
```

The first URL has an unencoded space. The second contains a template placeholder that was never resolved, which the remote server rejects.

## Fixed example

```html
<img src="https://example.com/images/photo%20one.jpg" alt="A photo">

<link rel="stylesheet" href="https://example.com/styles/main.css?v=2.1.0">
```

Spaces are percent-encoded as `%20`, and the template placeholder is replaced with an actual value. If the URL points to an internal or private resource that the validator simply cannot access, the warning can be safely ignored, but verify the URL works in a browser first.
