How to fix nested link warnings
Nested links are not allowed on web pages, which prevents us from optimizing pages with nested links for performance and SEO.
Sometimes, in Framer, you might see a warning like this:
Nested Links
This layer’s parent already contains a layer with a link. Unset it to fix this issue.
or like this:
Nested link detected on layer About due to layer Header
A nested link occurs when one link is placed inside another. Browsers do not support this, so Framer displays a warning if you create a site with a link inside another link. Here’s how to resolve these warnings.
How nested links happen
Here’s how nested links often occur:
When you link a layer to something and then insert text with additional links.
When you link a layer to something and then insert a smart component that contains links.
How to fix the warnings
When you see the warning, it will direct you to both the outer and inner link. In the screenshot below, the warning indicates the inner link, while “See layer” will direct you to the outer link.
Additionally, in the screenshot below, “On layer” refers to the inner link, while “Parent layer” denotes the outer link.
To fix this, remove one of the links—typically the outer one—and restructure it so that they no longer nest.
Editor and optimization warnings
With nested links, you may encounter two types of warnings.
In simple cases, we can detect nested links immediately. In this instance, you’ll see the warning below, and Framer will prevent you from publishing the site until you fix the issue.
Nested Links
This layer’s parent already contains a layer with a link. Unset it to fix this issue.
In more complex cases, we detect nested links only after publication. This occurs when dynamic content creates the nested links, such as CMS content with links, components with fixed links, or overrides and code components that introduce links. In these situations, the site will publish successfully; however, after publishing, you will see a different warning:
/page
[warning] Nested link detected on layer About due to layer Header
This warning indicates that we had to remove the nested link ourselves. Instead of the nested link, we inserted an element that resembles and functions like a link but:
isn’t recognized by search engines (like Google)
doesn’t support long-pressing (on phones) or right-clicking (on computers)
has poorer accessibility compared to regular links
This replacement is necessary because browsers don’t support nested links. However, it does degrade the user experience, so we still recommend fixing it.
Older warnings
Sometimes, you may encounter an optimization warning that appears differently than the one mentioned above.
This is an older warning that appears on pages or components edited before November 2024. To resolve it, locate the page or component referenced in the error message, edit it, and republish the site. While this won't eliminate the warning, it will update the error, making it easier to find and remove the link.