# <a href> external links in Confluence storage format

URL: https://goingstellar.ro/reference/confluence-storage-format/external-links/

Links to other sites use a standard a element with an href, with no ac: or ri: markup. Confluence adds the external-link class and rel nofollow in the view. An ADF save keeps the href and the text, and drops the title attribute and the target.

## Storage format

```xml
<a href="http://www.atlassian.com">Atlassian</a>
<a href="mailto:someone@example.com">mail</a>
```

## As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

```xml
<p><a href="http://www.atlassian.com">Atlassian</a></p>
```

```json
{
 "type": "doc",
 "content": [
  {
   "type": "paragraph",
   "content": [
    {
     "text": "Atlassian",
     "type": "text",
     "marks": [
      {
       "type": "link",
       "attrs": {
        "href": "http://www.atlassian.com"
       }
      }
     ]
    }
   ]
  }
 ],
 "version": 1
}
```

## Examples

Storage format sent:

```xml
<p><a href="http://www.atlassian.com">Atlassian</a></p>
```

The external link example from the storage format page.

Rendered view (HTML):

```html
<p><a class="external-link" href="http://www.atlassian.com" rel="nofollow">Atlassian</a></p>
```

Storage format after the round trip through ADF:

```xml
<p><a href="http://www.atlassian.com">Atlassian</a></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<p><a href="https://example.com" title="Tooltip">titled link</a></p>
```

A link with a title attribute meant as a tooltip.

Rendered view (HTML):

```html
<p><a class="external-link" href="https://example.com" rel="nofollow" title="Tooltip">titled link</a></p>
```

Storage format after the round trip through ADF:

```xml
<p><a href="https://example.com">titled link</a></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<p><a href="https://example.com" target="_blank">new tab</a></p>
```

A link that is supposed to open in a new tab.

Rendered view (HTML):

```html
<p><a class="external-link" href="https://example.com" rel="nofollow">new tab</a></p>
```

Storage format after the round trip through ADF:

```xml
<p><a href="https://example.com">new tab</a></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<p><a href="mailto:someone@example.com">mail</a></p>
```

A mailto link.

Rendered view (HTML):

```html
<p><a class="external-link" href="mailto:someone@example.com" rel="nofollow">mail</a></p>
```

Storage format after the round trip through ADF:

```xml
<p><a href="mailto:someone@example.com">mail</a></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<p><a href="https://example.com"><strong>bold link</strong></a></p>
```

A link whose text is bold, with the strong element inside the a element.

Rendered view (HTML):

```html
<p><a class="external-link" href="https://example.com" rel="nofollow"><strong>bold link</strong></a></p>
```

Storage format after the round trip through ADF:

```xml
<p><strong><a href="https://example.com">bold link</a></strong></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

## What changes in conversion

- The href and the link text round-trip unchanged for http, https and mailto addresses.
- A title attribute is kept in storage and in the view, but the ADF link mark has no title in this test, so a save from the Cloud editor removes it.
- A target attribute is removed the first time the content is stored. Reading it back through storage already shows no target.
- A strong element inside the a element comes back reversed, as a link inside strong. The page looks the same.

## Pitfalls

- The view adds rel="nofollow" to external links. That attribute is output by Confluence and cannot be changed from the markup.
- A new-tab link cannot be written in storage format, because target is discarded on save.
- A link to an address on the same Confluence site is still an a href, not a page link, and it breaks when pages are moved or renamed.

## Related

- [Smart links: inline, card and embed](https://goingstellar.ro/reference/confluence-storage-format/smart-links/)
- [<ac:link> to a page](https://goingstellar.ro/reference/confluence-storage-format/page-links/)
- [Link bodies: plain text and rich](https://goingstellar.ro/reference/confluence-storage-format/link-bodies/)
- [Anchor links](https://goingstellar.ro/reference/confluence-storage-format/anchor-links/)
- [<strong>, <em>, <b> and <i>](https://goingstellar.ro/reference/confluence-storage-format/bold-italic/)

## Sources

- [Confluence storage format (Atlassian Documentation)](https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html)
- [Atlassian Document Format: document structure (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)

