---
title: Hyperlinks Are Using Relative Reference
description: While relative URLs come with quicker coding, a staging environment, and faster load times, they can lead to issues with crawling.  Here's how to fix.
---

[Knowledge Base - Resources - seoClarity ](https://www.seoclarity.net/resources/knowledgebase)

# [Hyperlinks Are Using Relative Reference](https://www.seoclarity.net/resources/knowledgebase/glossary/hyperlinks/hyperlinks-using-relative-reference)

 Written by [Suraj Lalchandani](https://www.seoclarity.net/resources/knowledgebase/author/suraj-lalchandani) | May 8, 2023

While relative URLs come with quicker coding, a staging environment, and faster load times, they can lead to issues with crawling. 

You may consider updating relative links to be absolute instead of relative. Here’s how. 

#### Table of Contents

- - [Why Avoid Relative Links](https://www.seoclarity.net/resources/knowledgebase/glossary/hyperlinks/hyperlinks-using-relative-reference?hs_amp=true#avoid)
    - [How to Change Relative URLs to Absolute](https://www.seoclarity.net/resources/knowledgebase/glossary/hyperlinks/hyperlinks-using-relative-reference?hs_amp=true#change)
    - [How to Update Hyperlinks at Scale](https://www.seoclarity.net/resources/knowledgebase/glossary/hyperlinks/hyperlinks-using-relative-reference?hs_amp=true#update) 
          - [Before and After](https://www.seoclarity.net/resources/knowledgebase/glossary/hyperlinks/hyperlinks-using-relative-reference?hs_amp=true#before)
    - [*Looking for other hyperlink issues?*](https://www.seoclarity.net/resources/knowledgebase/glossary/hyperlinks/hyperlinks-using-relative-reference?hs_amp=true#looking)

 

## Why Avoid Relative Links

Relative links are used on many websites but greatly increases the likelihood of crawling issues, wrong indexation, and [duplicate content](https://www.seoclarity.net/blog/duplicate-content). 

This is because relative reference URLs link to other pages based on a relative path from the location of the page itself.

**Recommended Reading:** [What Is the Difference Between a Relative and an Absolute URL?](https://www.seoclarity.net/resources/knowledgebase/difference-relative-absolute-url-15325/)

## How to Change Relative URLs to Absolute

It is strongly recommended to use absolute references for URLs (include the full protocol and domain name portion in the URL) as a best practice to avoid a wide range of issues.

Here is an example of a relative URL:

*<a href = "/xyz.html">*

Whereas an absolute URL includes the entire address, from the protocol to the domain name, plus the location of the folder system. An absolute URL would look like this:

*<a href = http://www.example.com/xyz.html>*

To make the update, you’ll need to make changes via your CMS or the site’s code. You’ll want to find all instances of the relative URLs (i.e. only contains the location following the domain) and fill in the gap of the missing domain. 

If you don’t have the access to make these changes through the CMS or the HTML, you can bring in the dev team for help. 

## How to Update Hyperlinks at Scale

Another way to change relative URLs to absolute is to leverage [SEO execution platform](https://www.seoclarity.net/seo-automation/) ClarityAutomate. 

This way, you’ll be able to implement site changes across thousands of pages, all in a matter of minutes.  

- **Select what you'd like to optimize: Links**

To begin, we select “Links” in ClarityAutomate. 

- **Choose how you'd like to optimize it: Update Attribute**

As opposed to adding or deleting an element, this fix requires us to update an existing link. 

- **XPath location: XPath of <a href> that needs to be updated**

This step specifies the location of the hyperlink that will be updated. 

- **Attribute: href**

The part of the <a href> to be updated is the href. 

- **New Value: The updated hyperlink with the absolute reference**

As a last step, enter the new URL with the absolute reference. Remember, that means it’s the full URL of the page.

## Before and After

With [ClarityAutomate](https://www.seoclarity.net/seo-automation/), a few minutes is all it takes to change relative URLs to absolute. 

#### Looking for other hyperlink issues?

- [Broken or Incorrect Hyperlinks](https://www.seoclarity.net/resources/knowledgebase/glossary/hyperlinks/broken-or-incorrect-hyperlinks)
- [Hyperlink (<a href>) Has Both href and onclick Attribute](https://www.seoclarity.net/resources/knowledgebase/glossary/hyperlinks/hyperlink-has-both-href-and-onclick-attribute)

[View full post](https://www.seoclarity.net/resources/knowledgebase/glossary/hyperlinks/hyperlinks-using-relative-reference)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Suraj Lalchandani"
  },
  "dateModified" : "2023-05-24T16:42:29.182Z",
  "datePublished" : "2023-05-08T18:03:50Z",
  "headline" : "Hyperlinks Are Using Relative Reference",
  "image" : {
    "@type" : "ImageObject",
    "height" : 601,
    "url" : "https://www.seoclarity.net/hubfs/page_hyperlinks_2_hyperlinksareusingrelativereference.png",
    "width" : 1201
  },
  "mainEntityOfPage" : "https://www.seoclarity.net/resources/knowledgebase/glossary/hyperlinks/hyperlinks-using-relative-reference",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Knowledge Base"
  }
}
```