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.

 

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.