In SEO and web development, hidden links are links that are in a page's code but are not shown on the screen. The link still works, and a program that reads the code still finds it. A visitor looking at the page does not see it.
This page covers the ways a link can be in the code and not on the screen, when a hidden link is there for a reason, how to find hidden links on a website, what to do about hidden links you did not put there, and how hiding links from Ahrefs works.
What are hidden links?
A link is an <a> element with an href attribute that holds the address it points to. Whether a visitor sees the link is decided by the page's CSS and HTML attributes, not by the link itself.
So "hidden" describes how the page is drawn. The link is in the code, and a style or an attribute keeps it off the screen.
A hidden backlink is the same thing seen from the other side: a link on someone else's page that points to your site and is not shown to that page's visitors. You cannot see it by visiting the page, but it is in that page's code. In the same way, a hidden link on your own page that points to other websites is a hidden backlink for each of them.
The links on pages you control, your internal links among them, are the ones you can check directly, because you can read their code whenever you like.
Ways a link can be in the code and not on the screen

The first four definitions below are from MDN Web Docs, Mozilla's reference for web developers, as last modified in 2026. The last two describe plain CSS in our own words.
display: none. MDN: "Turns off the display of an element so that it has no effect on layout (the document is rendered as though the element did not exist)." The page is drawn as though the link were not there at all, and it leaves no gap.visibility: hidden. MDN: "The element box is invisible (not drawn), but still affects layout as normal." The link leaves a gap where it would have been: the space is still reserved on the page, but nothing is drawn in it.opacity: 0. MDN: "When opacity value is set to 0, the element and all of its children appear invisible, but they are still part of the DOM." The link is fully transparent but still in the page. MDN's page on opacity adds that such elements still register pointer events and still receive focus if they are in the tabbing order, so a transparent link can still be clicked or reached by keyboard.hidden. This one is an HTML attribute rather than a CSS rule. MDN: "The hidden attribute indicates that the content of an element should not be presented to the user."position: absolutewith a large negative offset, for exampleleft: -10000px. The link is drawn far outside the visible area of the window, so it never appears on the screen.font-size: 0, or a textcolorset to the same value as the background. The link's text is drawn at zero size, or in a colour that matches the page behind it, so a visitor cannot pick it out.
In every case the <a> element is still in the page's code. That is why the way to find a hidden link is to read the code and not the screen.
When a hidden link is there for a reason
Accessibility is the documented case. Some content needs to be read by a screen reader but not shown to sighted visitors, and WebAIM, the accessibility organisation based at Utah State University, describes the techniques on WebAIM's page on invisible content. The page says it was last updated on 25 September 2020. Its recommended style for that content moves it 10,000 pixels to the left, out of the visible window, and because the content is still part of the page, screen readers still read it.
The page's examples include a hidden "Search terms" label on a search box and hidden "You are here:" text before breadcrumbs. For links, the example is the skip link. A "skip to main content" link is the first link on a page and lets a keyboard user jump past the menu. WebAIM describes a pull in two directions: designers may not want such a prominent link on show, but hiding it makes it much less usable for sighted keyboard users. Its answer: "One way to reconcile this conflict is to visually hide the link until the user tabs to it at which point it becomes visible to sighted users." The W3C's Web Accessibility Initiative describes the same kind of link in its technique G1, updated on 9 March 2026: a link at the top of each page that goes directly to the main content.
Other cases are the links inside a menu that is closed, or inside a tab or an accordion that is not open. They are in the code and appear when the visitor opens the menu. So finding a hidden link in the code tells you that it is there. You then read what it points to and why.
How to find hidden links on a website

To see hidden links on a website, read its code, because the screen will not show them.
- Open the page in Chrome or Firefox, right-click and choose Inspect. Both browsers' developer tools have a search inside the page's markup: Chrome's documentation says the search takes a string, a CSS selector or an XPath selector, and Firefox's says its search box matches all markup in the document and in any frames. Press Ctrl+F (Cmd+F on a Mac) inside the Elements or Inspector panel.
- Search for
a[href]. That CSS selector matches every<a>element that has an address, so the search steps through every link in the page's current code, including links that a script added after the page loaded. - For each link you do not recognise, look at the element and the elements that contain it for the hiding styles:
display: none,visibility: hidden,opacity: 0, thehiddenattribute, a large negativeleftortop, a zero font size. - Search the same panel for the giveaways directly:
display:none,left:-andopacity:0, then again with a space after each colon, such asdisplay: none, because the search matches the text as it is written in the code. - Repeat on a second template, such as a blog post or a product page, and again while logged out in a private window, so you see the page as a visitor sees it.
To do this across a whole site, use a crawler that reads every page and lists each page's outgoing links. Screaming Frog's SEO Spider has a "Link Position" column that says where in the code a link sits (head, navigation, footer and so on) and a "Unique External JS Outlinks" column that counts the external links that exist only after JavaScript has run. Sort the external links by destination and look for domains you do not know.
Google Search Console's Links report shows links to and within your site, but its own help page describes the report as a sample, with tables limited to 1,000 rows, so it is a starting point and not a full list. The links other sites point at you are a separate list from the links on your own pages: they are your backlink profile, and reading that list is a different job from reading your own code.
Hidden links you did not put there
The other way a hidden link gets onto a site is that someone with access to the site adds it without the owner knowing.
MD Pabel, a WordPress security specialist, published an account of one such site on 13 July 2026. MD Pabel's case study describes what gave it away: the client's Search Console showed a query that had nothing to do with the business, with 41,397 clicks and 90,559 impressions in 28 days. Those are one client's figures for one query, not a rate. The homepage looked normal. He found a block of links inside an Elementor HTML widget, moved off screen with CSS. Because the block sat inside a widget, the theme files could stay clean, so a scan that reads only files could miss it. In his words: "The element remains in the page HTML, but the large negative left value pushes it outside the visible screen. The owner does not see it during normal browsing, while a crawler can still find the text and links." And: "That is why checking only the visual frontend is not enough."
In his account, he cleaned the site in this order:
- Removed the block and confirmed the homepage still worked.
- Loaded the site while logged out, cleared its cache and searched the source and the rendered HTML for the keywords, the links and the off-screen CSS.
- Searched the database for other copies and reviewed the WordPress files, plugins and user accounts.
- Updated WordPress, plugins and themes where needed, removed unused ones and changed passwords.
- Cleared the WordPress, hosting and CDN caches.
- Checked the result in an incognito window and with repeat scans.
A report and a guide help with the same job. Google Search Console has a Security issues report, and one of the types it lists is "Hacked: Content injection". WordPress's own hardening guide says to keep WordPress up to date and to take plugins and themes only from the WordPress.org repository or well-known companies.
This section is about links on your own pages. Links from other sites to yours are the other half of the picture, and our guide to links in your backlink report that you did not choose covers those.
How to hide links from Ahrefs
The way to stop Ahrefs reading the links on your own pages is a rule in your site's robots.txt file. Ahrefs learns about links by crawling pages. Its crawler is called AhrefsBot, and the token that names it in robots.txt is AhrefsBot. Ahrefs' own page about its bots says: "If you want to stop AhrefsBot or AhrefsSiteAudit from visiting your site or a section of it, use Disallow directives:" The rule is two lines in the site's robots.txt file:
User-agent: AhrefsBot
Disallow: /
The same page lists "Obeys robots.txt: Yes" for AhrefsBot, and covers a second bot, AhrefsSiteAudit, which it says obeys robots.txt by default. The page also notes that AhrefsBot may need some time to pick up a change to the file.
Other backlink crawlers work the same way, by their own pages. Majestic's crawler is MJ12bot, and its page says it adheres to the robots.txt standard. Semrush's crawler is SemrushBot, and its page gives the same two-line rule with its own token.
A robots.txt file applies only to the site it sits on. A rule in your file stops the bot reading your pages, so it does not read the links on them, your outgoing links. A link from another site to yours sits on that site's page, and that site's robots.txt decides whether the bot reads it.
For more on the crawler itself, see our guide to AhrefsBot.
Where the links we place sit
The links we place sit in the body copy of a page, in a sentence a visitor reads. A Curated Link is added to an article that is already published, and a Guest Post is a new article of 750 words or more with one contextual link, on a real, independently owned website. After a placement is published, we check that the page is live, that the link is in the body copy, that the anchor and target URL match the order and that the page is indexable. Only then is the URL reported to the dashboard. That order of checks is part of our quality assurance.
Frequently asked questions
What is a hidden link?
A hidden link is a link that is in a page's code and is not shown on the screen. A style or an attribute, such as display: none, opacity: 0 or an off-screen position, keeps it from being drawn. The link element is still in the code, and the link still works.
How do you find hidden links on a website?
Open the browser's developer tools, search the markup for the selector a[href] and check each unfamiliar link and the elements that contain it for the hiding styles. Across a whole site, a crawler lists every page's outgoing links, which you can then sort by destination.
What is a hidden backlink?
A hidden backlink is a link on another site's page that points to your site and is not shown to that page's visitors. You find it the same way you find any hidden link: by reading that page's code rather than looking at the page.
Is a hidden link ever there for a reason?
Yes. A skip link that appears when a keyboard user tabs to it is the documented example, described by WebAIM and by the W3C's technique G1. The links inside a closed menu are another case: they are in the code and appear when the menu opens.
Can you hide links from Ahrefs?
A robots.txt rule for AhrefsBot stops Ahrefs' crawler reading your own pages, and Ahrefs' page about its bots says the bot obeys robots.txt. Links to you on other sites' pages are governed by those sites' robots.txt files, not yours.
related Blog Posts

Join 7,000+ Clients Growing with Rhino Rank
Sign UpStay ahead of the SEO curve
Get the latest link building strategies, SEO tips and industry insights delivered straight to your inbox.







