Expand my Community achievements bar.

Join us in celebrating the outstanding achievement of our AEM Community Member of the Year!

Relative or absolute page links within AEM?

Avatar

Level 1

Within our content team, some users make use of the search function when adding internal links, and as such their page links are relative. Others add links in as absolute.

Recently we had a sitewide issue where all relative links broke, and this has prompted a discussion on which is technically superior. The way I see it - neither have any affect SEO wise anymore, and the pros and cons would simply come down to:

Absolute - Works, fewer steps

Relative - Works, but AEM will also notify you if you are about to move a referenced page, and gives you the option to update and republish automatically.

 

= Relative is slightly better

Aside from a general relative v absolute discussion, which doesn't really matter in today's web, are there any other benefits to either specifically with Adobe AEM?

Many thanks in advance.

2 Replies

Avatar

Level 3

It is recommended to author relative links which will have following benefits -

1. When you move a page, it will automatically update reference and publish. I think this is critical to avoid 404s or broken links.

2. Also, while taking a content package and moving to another environment, it is critical to have relative links. This helps in link validation. Also, if it is an absolute form url, it will cause unnecessary submissions to production if tested from lower environments.

 

 

Avatar

Level 8

I would recommend relative links. You ensure stability and  consistency across references when some path changes its root location. You will also benefit of AEM capability of handling relative paths if needed. And basically you are not hardly coupled to the exact location of the resource you are pointed to, which is something any good architecture tries to achieve.

 

Imagine a scenario where you need to dynically generate some structure of CFs, each CF presented on its own page. Let's a Product Detailed Page. And you generate that in /content/dam/brand/catalog_1. Now you want to move everything to catalog_2. Youl will need yo update all absolute links if you use them. Anyway, this may be a very  specific use case,  and might not be what you are having. But just think about it.

 

But I am curious, what site issues did you encounter ?