BF50 Black Friday · 50% off all plans
from $5/mo · Auto-applied ---:--:-- Claim 50% off →
Skip to content

Search Seonio

Type a keyword, domain, or paste a URL

Start free with $1 to see full results. Powered by Seonio
Web Development

Hyperlink: What it is and how links work in SEO

A hyperlink takes a reader to another page, file or spot on a page in one click. Search engines follow links too, to find pages and see what they're about.

Monthly searches · hyperlink
90.5k
Keyword research data
hyperlink
Hyperlink: What it is and how links work in SEO
Click the image to view it full size

In HTML, a hyperlink is usually an <a> element with an href attribute. The href holds the destination, and whatever sits between the opening and closing tags (a few words, an image, a button) is what people click. That visible part is the anchor text.

A link can point almost anywhere a URL can: another site, another page on your own site, a PDF, an email address (mailto:), a phone number (tel:) or a section of the same page (#pricing). Short links like these are often just called "links".

Here is a typical link, with the attributes you'll meet most often:

<a href="https://example.com/guides/ghost-peppers" rel="sponsored" target="_blank">ghost pepper growing guide</a>
  • href is the destination. It can be absolute (https://example.com/guides/) or relative to the current page (/guides/). Both work for browsers and for Google.
  • The anchor text, here "ghost pepper growing guide", tells people where they're going.
  • rel describes your relationship with the linked page, such as a paid placement. Most links don't need it.
  • target="_blank" opens the link in a new tab.

A link that jumps to a spot on a page uses a fragment identifier: the part after # matches an id on the target page.

Google uses links in two ways: to find new pages to crawl, and as a signal of what a page is about and how relevant it is. Google Search Central

That makes two kinds of links worth your attention:

  • Internal links connect pages on your own site. Google's advice is that every page you care about should have a link from at least one other page on your site. A page nothing links to is an orphan page, and crawlers struggle to find it.
  • Links from other sites to yours are backlinks. They bring visitors directly and help search engines judge your pages.

Links aren't the only path, though. A sitemap can also tell Google which pages exist.

Google can reliably crawl a link only when it's an <a> element with an href that resolves to a real web address. These work:

<a href="https://example.com/shoes">
<a href="/products/shoes">
<a href="/products/shoes" onclick="track('shoes')">

These may not be followed, because there's no usable URL in an href:

<span href="https://example.com/shoes">
<a onclick="goto('https://example.com/shoes')">
<a href="javascript:goTo('shoes')">

Links that JavaScript adds to the page after it loads are fine, as long as they end up in the first form. If your navigation is built by a script, check the rendered page with the URL Inspection tool.

Good anchor text is descriptive, reasonably short and relevant to both pages. A useful test: read only the link words. If you can't tell what's behind them, they need more detail.

  • Weak: To see our cheese types, <a href="/cheese">click here</a>.
  • Better: See the <a href="/cheese">full list of cheese types</a> we sell.

For an image used as a link, Google reads the image's alt text as the anchor text, so don't leave it empty. If a link has no text at all, Google may fall back to its title attribute.

Don't pack keywords into anchors. Google's advice is to write naturally and ask whether the reader needs those words to understand the next page; forcing them in is keyword stuffing, which breaks its spam policies. And space your links out: several one-word links in a row are hard to tell apart.

For an ordinary link, you don't need a rel attribute. Add one when the link isn't a plain editorial recommendation:

The link is... Use
An ad, a sponsorship or any other paid placement rel="sponsored" (nofollow is also accepted)
Posted by users, in comments or a forum rel="ugc"
To a page you don't want to vouch for, and the others don't fit rel="nofollow"

Google Search Central

Google generally doesn't follow these links, but the target page can still be crawled if Google finds it another way. Don't add nofollow to every outbound link: Google says linking out to good sources, such as when you cite them, can help show your page is trustworthy.

target="_blank" opens the link in a new tab, or a new window if the user set their browser that way. Modern browsers treat it as if you had also added rel="noopener", so the new page can't control yours. Since a new tab can surprise people, say so in the link or next to it, and do the same for links that start a download.

Links break when a page moves or disappears. A visitor who hits a broken link sees a 404 error, and the link stops leading anywhere useful. When you move a page, redirect its old address to the new one, and check your site for dead links from time to time.

Seonio

Put it to work on your own site

Keyword research, traffic, backlinks and clustering in one place. Start with a free $1 to test, no card required.