AEM: Link Creation Best Practices

Tags AEM

Within AEM Author, there are two types of hyperlinks used on a web page.

  1. Absolute: https://www.villanova.edu/university/technology-services.html
  2. Relative: /content/university/technology-services.html

 

When do you use one vs the other?

Absolute hyperlinks are used when you are linking to a site OUTSIDE of Villanova’s website.

Why? You need an absolute FULL PATH when pointing to a site outside of our www.villanova.edu domain. If you do not do this, the link will not work for the end users.  

Relative Links are used when you are linking to a page within the www.villanova.edu website. 

Why?  The AEM Authoring tool offers features that can help you manage your content more effectively when using relative links. 

**This will be the way you will create your links most of the time.**

 

What is the main AEM Author Best Practice when creating Relative Links?

ALWAYS start the relative link with /content/ in the path. 

Why? The tool looks for the full path structure when functions like link validation and “move” or “rename” tools are used.

 

What will happen if I don’t put in /content/ when creating relative links in AEM?

  • You risk that the link validation will think your link is broken and will disable the link from your webpage automatically when published.
  • You cannot leverage the “move” tool, so if you need to rename or move pages on your website later, it will be more challenging to do so.

 

 

Fixing Broken Links 

As an AEM Author, it is expected that your section of the site is maintained with accurate content. This includes updating your broken links which can negatively impact the user experience, are bad for Search Engine Optimization (SEO), and can be for ADA compliance.

Go to SiteImprove

Siteimprove Overview

 

This will bring you to your specific area of the Broken Links Dashboard. This lists all of the broken links as seen below.

A specific url in Siteimprove

Note the column labeled “Pages” and expand the down arrow. This will then open up the specific page the broken link appears on.

An image of the web page in Siteimprove

From here you can select the Page Name, and it will bring you to the page within Siteimprove.

Siteimprove view HTML button

You will then want to select the “View HTML” button which will show you where the broken link is within the HTML source code. 

Fix the Link

To fix the specific link using AEM you will then click the “CMS” button which will open the page within Author. 

Siteimprove CMS button

Once within AEM you would correct the link and then “Publish” the page.

AEM page properties menu

Once the page is published with the fix, please select the “rotating arrows” to have Siteimprove check the page again and clear the broken link.  Please note that SiteImprove scan to update the index is run once a week over the weekend, so if you don’t see your change right away in the tool, check the following Monday.

Siteimprove refresh button

Print Article

Related Services / Offerings (1)

The Web Services and Technologies group assists with several areas that involve AEM websites within the villanova.edu domain.