---
schema_version: "1"
id: 24786eafe23517ea800b5aa22dc3d1e1293dd11cf59fc2c60ecfaa5e9b1dd055
title: Add Links to Lightning Pages from Your Custom Components
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/components/components-navigation-add-links.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/components-navigation-add-links.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 95d8a8d9252214c56d51ae166765a46321697637f6413066ffe25e1bc30037f1
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Add Links to Lightning Pages from Your Custom Components

To link to Lightning Experience pages, use `lightning:formattedUrl` in your custom component. The `lightning:formattedUrl` component displays a URL as a hyperlink.


## Avoid Full Page Reloads

If you use raw anchor tags or the `ui:outputUrl` (deprecated) component for links, the page does a full reload each time you click the link. To avoid full page reloads, replace your link components with `lightning:formattedUrl`.

For examples, see the [Component Library](https://developer.salesforce.com/docs/component-library/bundle/lightning:formattedUrl/example).

## Migrate from ui:outputUrl to lightning:formattedUrl

Copy the attributes from the `ui:outputUrl` component.

```nolang
<aura:component>
    <ui:outputURL value="https://my/path" label="Contact ID" />
</aura:component>
```

Paste the same attributes into the `lightning:formattedUrl` component. `lightning:formattedUrl` supports more attributes, like `tooltip`.

```nolang
<aura:component>
    <div aura:id="container">
        <p><lightning:formattedUrl value="https://my/path" label="Contact ID" tooltip="Go to Contact's recordId" /></p>
    </div>
</aura:component>
```

**See Also**  


-   [*Component Library*: lightning:formattedUrl Reference](https://developer.salesforce.com/docs/component-library/bundle/lightning:formattedUrl/documentation)

